You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/06/28 14:23:55 UTC
SortableModel and t:dataTable - change sorting algorithm for a
specified column
Using a SortableModel and t:dataTable creates sorting Links by default.
Using Numbers in a column and sort them works, but the used algorithm to
sort is not equal to the natural sorting we use, of cause its a default
implementation it cant work for all, but how to change this for certain
columns.
I want to use this model and only modify the algorithm for some columns.
kind regards
Torsten
-- Give a man a fish and you feed him for a day; teach him to use the
Net and he won't bother you for weeks. --
Re: SortableModel and t:dataTable - change sorting algorithm for a
specified column
Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Thx - works, your right.
kind regards
Torsten
Am Mittwoch, den 28.06.2006, 05:45 -0700 schrieb Catalin Kormos:
> The SortableModel tryies to sort them as Comparable, if they don't
> implement that interface, than it sorts them as strings; as far as i
> can tell, having your objects displayed in a column implement that
> interface would allow you to customize the algorithm.
>
> HTH,
> Catalin
>
> Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Using a SortableModel and t:dataTable creates sorting Links by
> default.
> Using Numbers in a column and sort them works, but the used
> algorithm to
> sort is not equal to the natural sorting we use, of cause its
> a default
> implementation it cant work for all, but how to change this
> for certain
> columns.
>
> I want to use this model and only modify the algorithm for
> some columns.
>
> kind regards
>
>
> Torsten
>
>
> -- Give a man a fish and you feed him for a day; teach him to
> use the
> Net and he won't bother you for weeks. --
>
>
>
>
>
> ______________________________________________________________________
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> countries) for 2¢/min or less.
-- I believe the technical term is "Oops!" --
Re: SortableModel and t:dataTable - change sorting algorithm for a specified column
Posted by Catalin Kormos <ca...@yahoo.com>.
The SortableModel tryies to sort them as Comparable, if they don't implement that interface, than it sorts them as strings; as far as i can tell, having your objects displayed in a column implement that interface would allow you to customize the algorithm.
HTH,
Catalin
Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote: Using a SortableModel and t:dataTable creates sorting Links by default.
Using Numbers in a column and sort them works, but the used algorithm to
sort is not equal to the natural sorting we use, of cause its a default
implementation it cant work for all, but how to change this for certain
columns.
I want to use this model and only modify the algorithm for some columns.
kind regards
Torsten
-- Give a man a fish and you feed him for a day; teach him to use the
Net and he won't bother you for weeks. --
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.