Hi Ken,

I'm in a similar situation. All I can tell you is that the sortCriterion 
is the column name, as defined in your display:column tag in the jsp, 
like so

sortProperty="whatever_you_want_to_call_it"

There is also sortName field which the doc' seems to suggest you should 
use. I found this didnt work but sortProperty did.

You then just have a sortCritrion String in your PaginatedList 
Implementation with a set and implemented get. The tag does the rest. 
You don't need to worry about the searchId, just leave that to return a 
null.

As for the getSortDirection() this is where I'm stuck! You need to 
return a SortOrderEnum object , either SortOrderEnum.ASCENDING or 
.DESCENDING. However, I don't see how displayTag alternates this.

Try just having a SortOrderEnum field in your paginatedList 
implementation and just let the get and set get or set it. DisplayTag 
should really deal with alternating the direction.

You'll see the sort=asc or sort=desc in the request when you mouse over 
the column title spin button. I only ever see one, which suggests the 
direction isnt being alternated.

Keep us updated on your progress, I've yet to hear from anyone who has 
got sorting working for PaginatedList implementations.

Regards,

John.

Hoying, Ken wrote:
> There is very little documentation on how to use this and the JavaDoc, 
> to put in nicely, is weak.  I have reviewed the archive and have seen 
> many questions on this functionality but not a lot of answers.  I am 
> going to give it a try as well and hope for a response.
> 
> I have figured the the paging and have the working fine.  Now I would 
> like to implement the sorting.  However, it is not at all clear to me 
> how this is done.  Can someone maybe shed some light on the 
> PaginatedList interface and explain what the getSearchId() and 
> getSortCriterion() methods should return?
> 
> Thanks in advance!
> Ken
> 
> ------------------------------------------------------------------------
> 
> * ***Note:The information contained in this message may be privileged 
> and confidential and protected from disclosure. If the reader of this 
> message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to the intended recipient, you 
> are hereby notified that any dissemination, distribution or copying of 
> this communication is strictly prohibited. If you have received this 
> communication in error, please notify the Sender immediately by replying 
> to the message and deleting it from your computer. Thank you. Premier Inc. *
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> 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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to