IMO, by default displaytag should use copmpareTo method of the uderlying object. If it is String then sorting should be case sensitive (maybe there are situations were you would need this). However, there should be a way to specify Comparator class per column. Even when you want to sort Strings, many non-English users would like to sort Strings in their alphabet order (German, French, Russian...) or using some other sort order.

I have submitted patch (which could be outdated by now if there were CVS changes in last few weeks) which adds comparator attribute to column tag. This attribute should contain Comparator that should be used for sorting column. My solution is probably not the optimal one but it worked for me. I would really like if something similar would become part of display tag.

Dejan

Matt Raible wrote:

AFAIK, you can't. IMO, String sorting should be case insensitive out-of-the-box. Can anyone thing of a reason why it shouldn't be?

Matt

On Aug 16, 2004, at 5:18 PM, Jagadeesan, Srinivas (ETW) wrote:

Hi,
I saw a question earlier on implementing case insensitive sorting.
I do not want to wrap my String in a Custom object and implement compareTo, because the data value would be used by other areas of the application.
Is there any way to retain the data values as Strings and still implement case insensitive sorting?
Thanks,
Srini




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user





-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to