Menu

Sorting and Paging Problem

Help
GSI
2005-11-28
2012-10-09
  • GSI

    GSI - 2005-11-28

    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

     
    • mt_struts

      mt_struts - 2005-11-28

      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

       
      • GSI

        GSI - 2005-11-28

        That's that's exactly what I was looking for !
        You rock :)

         

Log in to post a comment.

MongoDB Logo MongoDB