Hello all,

I'm having trouble understanding how to get the defaultsort attribute of
the table tag to work.  The users want the app to remember how they have
sorted the tables.  So I've created a TablePreferences object for each
table which I put in request scope before the jsp is rendered.  I'm
using displaytag 1.1.1 with Struts.  Here's the table tag in question:

<display:table name="afs" id="projectAfTbl" sort="list"
pagesize="${tablePrefs.pageSize}"
defaultsort="${tablePrefs.defaultSort}"  class=. . . etc. 

The pagesize attribute works.  Once I set the table size, it is
displayed at that size from then until I change it again.  But when I
sort the table, then leave the page and reload it, the sorting is
ignored.  

I even tried hardcoding it like so:
<display:table name="afs" id="projectAfTbl" sort="list"
pagesize="${tablePrefs.pageSize}" defaultsort="2"  class=. . . etc. 
The defaultsort attribute was still ignored, and the table was displayed
unsorted.

Isn't defaultsort supposed to tell tabletag which column to sort on
before rendering the table?  And if so what do I have to do to make it
work?


Thanks,
gary

Gary Klaus 
Software Application Developer
Syngenta Biotechnology Inc. (SBI)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to