Structures_DataGrid requestPrefix for paging
| From: | pablo | Date: | Tue, 28 Dec 2004 16:01:28 +0000 |
| Subject: | Structures_DataGrid requestPrefix for paging | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16487@lists.php.net to get a copy of this message | ||
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?
Thank you.