Hi,
It seems that the sorting is only working for the current page and should work for the whole listing.
Here what I think should happend.
I have 2 columns, first is the id(int) and second is a description(string)
When I go to the first page it's default sorter by id and that part works like a charm.
When I change from ascenting to descending instead of getting the bigger id in the list I get the bigger id on the fistt page.
Is there an attribute I've missed for the column that would do the sort globally ?
Thanks, MC http://www.goodstockimages.com
You need to set the "sort" attribute on the <display:table> tag to "list". If you are using paging this attribute indicates that you want to sort over the whole list as opposed to sorting just the data on the page.
Check the TLD section of the PDF for more details: http://displaytag.sourceforge.net/displaytag.pdf
That's that's exactly what I was looking for ! You rock :)
Log in to post a comment.
Hi,
It seems that the sorting is only working for the current page and should work for the whole listing.
Here what I think should happend.
I have 2 columns, first is the id(int) and second is a description(string)
When I go to the first page it's default sorter by id and that part works like a charm.
When I change from ascenting to descending instead of getting the bigger id in the list I get the bigger id on the fistt page.
Is there an attribute I've missed for the column that would do the sort globally ?
Thanks,
MC
http://www.goodstockimages.com
You need to set the "sort" attribute on the <display:table> tag to "list". If you are using paging this attribute indicates that you want to sort over the whole list as opposed to sorting just the data on the page.
Check the TLD section of the PDF for more details:
http://displaytag.sourceforge.net/displaytag.pdf
That's that's exactly what I was looking for !
You rock :)