Re: Problems with Structures_Datagrid!

From: Date: Wed, 12 Jan 2005 23:27:36 +0000
Subject: Re: Problems with Structures_Datagrid!
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16907@lists.php.net to get a copy of this message
Hi Soren, http://pear.php.net/bugs/report.php?package=Structures_DataGrid (Bug type : feature/change request) -- og Søren Jepsen wrote:
Hi Justin & Olivier! Thanks for your input :=) I tried the redirect method.. It slows the response time by 50% - not that bad.. But maybe we should ask the author, to implement a method for parsing the querystring? I'm pretty new to this PEAR stuff - where do one apply such a request? Regards Søren Jepsen ----- Original Message ----- From: "Olivier Guilyardi" <ojaiml@nerim.net> To: <papercrane@reversefold.com> Cc: "Søren Jepsen" <sje@luminans.dk>; "PEAR" <pear-general@lists.php.net> Sent: Monday, January 10, 2005 6:16 PM Subject: Re: [PEAR] Problems with Structures_Datagrid!
Justin Patrin wrote:
On Mon, 10 Jan 2005 17:39:44 +0100, Olivier Guilyardi <ojaiml@nerim.net> wrote:
Justin Patrin wrote:
Is there a workaround for this? Or maybe a feature where you tell the datagrid which parts of the querystring to inherit?
I suggest redirecting after you do any processing. This way you have exactly what you want in the URL and you can get rid of the "delete" page in the browser's history. I don't think there's any way to change the URL it sets.
I don't agree. Why two HTTP requests when one is enough ? There should be a datagrid option for this. Meanwhile, a workaround could be :
Because, as I said, it removes that entry from the browser's history. Doing this with POSTs is a great idea so that when the user clicks "Back" (as they *always* do) they don't get the "re-post" message and the script doesn't reprocess the information. In addition, it goes exactly where you want it to be
I agree with you that redirecting is a good thing when using POST. But Søren is obviously using GET...
$_SERVER['QUERY_STRING'] = ereg_replace('mode=[^&]+&?','',$_SERVER['QUERY_STRING']); $datagrid = new Structures_DataGrid(); etc...
I suppose an option for DG (and Pager, don't forget) to set the URL to append to would be nice.
Doesn't Pager already handle that sort of thing by using the 'fileName' and 'append' options ? The query string reconstruction happens inside Structures_DataGrid_Renderer_HTMLTable::_buildHTMLTableHeader(). I believe the best thing would be an option that allows you to specify something like "mypage.php?my_param=my_value&%s", where sprintf() would replace %s by all the parameters that the datagrid needs to pass. This should be easy to translate into a 'fileName' Pager option (If I understand it correctly). -- og -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#16907) next »