Re: Structures_DataGrid requestPrefix for paging
| From: | Andrew Nagy | Date: | Tue, 28 Dec 2004 18:23:01 +0000 |
| Subject: | Re: Structures_DataGrid requestPrefix for paging | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16488@lists.php.net to get a copy of this message | ||
Pablo wrote:
I am trying to implement DataGrid and am having trouble changing the requestPrefix for paging. I tried to simply do this: // build DO $module = DB_DataObject::factory('Module'); // setup datagrid $dg =& new Structures_DataGrid(5); $dg->bind($module); //set prefix for paging $dg->renderer->requestPrefix = "L"; // Show data $dg->render(); echo $dg->renderer->getPaging(); The problem is that my application already uses the default "page" variable for displaying pages. I need to change the prefix so that it does not conflict with my application to something else (e.g. Lpage). However, when I try this my page does not display correctly. It seems that the renderer is still relying on the "page" variable and goes nuts. I end up with a blank page followed by navigation buttons. In other words, the grid does not display. Anyone have ideas on how to correctly set the requestPrefix variable?Pablo, this looks like it is a bug, can you please enter it into the bug system? A fix for this would be to do the following: $dg =& new Structures_DataGrid(5, $_GET['Lpage']); $dg->renderer->requestPrefix = "L"; $dg->sortRecordSet($_GET['LorderBy'], $_GET['Ldirection']); I will look into the bug and try to release a fix to CVS Thanks Andrew