I am using Display tag library provided by Sourcefourge.net for pagination, It works great for me. The problem is it doesn't do the sorting independent of upper case and lower case. I want to do the sorting independent of upper case and lower case. Does any one used this tag library before and solved this problem or somebody know how can I solve this issue ?? thanks to all.
If you want a fix now, then you should add another property to your beans that contains a version of your strings in all lower-case and use that property as the sortProperty attribute. Something as simple asshould work. Or you could volunteer to work on the project and add new attributes that allow providing a Comparator or a Collator to the sort. It is open-source so you could do that.
Joined: Jul 18, 2005
Thanks for the reply but the solution which you gave me is to convert all the data to lower case, thats not what I want. I am sorry If was unable to explain properly. Here is the example. This is my data:
A a B b C c D d
My Business Object has this data and initially it displays as shown above which is independent of uppercase and lowercase. When I click on this column to do the sorting using display tag, it displays as
A B C D a b c d
This is the problem it should do the sorting independent of case.
Originally posted by shailesh kumar: Thanks for the reply but the solution which you gave me is to convert all the data to lower case, thats not what I want. I am sorry If was unable to explain properly.
Obviously I didn't explain properly either.
I understood your explanation. The code I posted was not intended to convert all the data to lower case, and in fact it does not do that. It just provides a separate property in your bean that you can use for sorting. Only for sorting. Do not use this property for displaying. Display the "data" property but sort on the "caseInsensitiveData" property.