David,
I really like this patch. Very good idea. If no-one applies, I'll apply it. Also, I'm voting +1 for CVS commit access for you, if you want it.
Cheers, Mathias Bogaert
On 26 Jun 2004, at 19:12, David Erickson wrote:
Might be a good idea to attach the patch ;) -David
Here is another enhancement for the project. It adds the attributeto
"preserveSortAndPage" to the table tag in both EL and standard versions.
The idea is that (at least from usage on our own site) someone can sort a
large list and get it exactly as they like it, then perhaps navigate awaysomething else, and would like to when they return see it the same waytheyleft it (potentially, the data could change). However navigating back toitthey likely wouldnt have the request parameters needed to sort it as itwas,so when the preserveSortAndPage attribute is set to true, the currentsession,
sort/page/sort order (and potentially previous sort/sort order) are all
saved into session attributes named the same as they would as request
parameters.
When the tag is executed and the preserveSortAndPage attribute is set to
true it will first check the request parameters for the necessary
information, and if it returns null from there it will fallback toandthen eventually to defaults.
There is an inherent limitation to this, if someone had a list somewhere
else on the site and it was using the same name variables for its list,it also had the preserveSortAndPage attribute set the variables couldclash,thats a limitation of the parameter encoder. I thought about tweaking thewould
parameter encoder to also encode perhaps the current request.uri whichbe unique to that list because it would be on a different page fromanotherlist, however we use struts and when I watched that value with thedebuggerit was just pointing to my base tiles layout.. (which was surprising tois
me).. so that wouldnt uniquely define the list either. So my conclusionit should be a documented limitation for people that want to use thisuse
feature, they need to name their lists differently if they are going tomethod,them across the site.
Oh and I also fixed a bug that was in the TableTag.initParameters()<PreserveSortAndPage.patch>it was attempting to load the previousSort from TableTagParameters.PARAMETER_SORT instead of TableTagParameters.PARAMETER_PREVIOUSSORT
Enjoy.. many more enhancements/fixes to come I would imagine =) -David
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel