For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > Re: [PEAR] Re: Re: Re: Structures_DataGrid HTML_Template_Flexy renderer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Re: Re: Re: Structures_DataGrid HTML_Template_Flexy renderer
Dan Rossi

2005-06-08, 8:58 am

On 08/06/2005, at 6:30 PM, Mark Wiesemann wrote:
>
> Open the .phps of your class in your browser, then you should see it.
> And also set the tabs setting in Eclipse to 4 spaces.


Right ok, I dont know what happened here.

>
> Why not doing it like this? (after binding)
> $template->setVariable('statistics', 'found ' . $dg->getRecordCount() .
> ' records on ' . $dg->getPageCount());
> (syntax may be wrong, I only know HTML_Template_Sigma)


From knowledge variables are gathered from the class instance sent to
the output method. It couldnt possibly get a variable from the class
with the datagrid method in it. I have however moved the compile of the
final datagrid template back into datagrid method so it collects the
getResults method from there.


>
> I can't see everything of this as code on your website but it sounds to
> be the right way.
>
> Please apply my fix described in bug #4521 to your renderer, otherwise
> I
> have to open a new bug report after your renderer has been accepted.
> ;-)
>
> The getPaging() function should return the links array from Pager, not
> a
> string with only parts of the array. This is also for more flexibility
> and for more compatibility with HTMLTable renderer (which also returns
> the array).
>


right hmm. I simply call getPaging() in the datagrid template, its
pretty clean. Looks like I have to handle a paging method in the class
with the datagrid its sorta seperating the entire datagrid package
then.

> One comment to your data_grid function() itself (altough I'm not a
> DataObject expert):
> You don't need the "if (is_object($do)) {". Just do a $dg->bind($do).
> SDG recognizes whether $do is a DataObject instance or an array.
>


Heh right ??? Lemme see :P
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com