users@woodstock.java.net

Re: Dynamic table sorting question

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Wed, 20 Feb 2008 16:42:18 -0500

I don't have any examples for you. However, BasicTableDataSorter tests
if objects implement Comparator, first. If the sorted object implements
this interface, you can control the sort. Otherwise, you could extend
BasicTableDataSorter and provide that to TableRowGroup.

Dan

Jianbo wrote:
> I have just started trying Woodstock dynamic table component. I am
> using the /dynamicTable/ example which has a list of /Name/s.
> Everything works fine with default sorting feature. But I want to do
> my own sorting with my own comparator.
>
> For example, I want to sort last name column in a different way (e.g.
> sort by the last letter of last name. I know it is crazy but I just
> want to know how to do it.)
>
> I have tried several things: subclass /ObjectArrayDataProvider/;
> subclass /BasicTableDataSorter/ and set it to my /TableRowGroup/; etc.
> But none or them works.
>
> I have searched and searched but didn't find an example.
>
> Please help me.
> Thanks,
> jianbo
> ------------------------------------------------------------------------
> View this message in context: Dynamic table sorting question
> <http://www.nabble.com/Dynamic-table-sorting-question-tp15592362p15592362.html>
> Sent from the Project Woodstock - Users mailing list archive
> <http://www.nabble.com/Project-Woodstock---Users-f26168.html> at
> Nabble.com.