On 8/6/07, Paul Cooper <[EMAIL PROTECTED]> wrote:
>
>
>
> I've asked this before but got no response, so I thought I'd try again….
>
> I've implemented external paging, since I'm using Hibernate, and my object
> result set can get pretty large. I'm having trouble implementing two
> aspects: external sorting and external exporting. The sorting works in one
> direction, but when I select a column for sorting a second time, it sorts
> the same way it was. I see support for a "dir" parameter, but I'm not sure
> how to implement it.

inside your paginatedlist implementation, you have a sortDirection
property.  in your action, grab the "dir" parameter and use it to set
that property:
e.g.
if(request.getParameter("dir") != null) {
  if(request.getParameter("dir").equalsIgnoreCase("asc")) {
    ascendingSort=true;
   } else {
     ascendingSort=false;
  }
}
myPaginatedList.setSortDirection(ascendingSort?SortOrderEnum.ASCENDING:SortOrderEnum.DESCENDING);

I'm going from memory here so correct syntax etc.  I don't know about export.
--tim

-------------------------------------------------------------------------
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