Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: 1.1
-
Component/s: Paging/Sorting
-
Labels:None
Description
It'd be nice if there were a column-level property indicating that the sorting should be case-insensitive for that column.
-
- displaytag.220.diff
- 10/Jun/05 2:18 PM
- 8 kB
- Guillaume Boudreau
-
Hide
- displaytag-1.0-with-sortComparator.zip
- 24/Oct/05 4:59 AM
- 20 kB
- Chidambaram Pl
-
- org/.../SortComparatorInstantiationException.java 2 kB
- org/.../CaseInsensitiveRowSorter.java 8 kB
- org/displaytag/model/HeaderCell.java 14 kB
- org/.../SortComparatorFactory.java 4 kB
- org/displaytag/model/TableModel.java 12 kB
- org/displaytag/tags/ColumnTag.java 26 kB
- org/displaytag/.../ColumnTagBeanInfo.java 6 kB
-
Hide
- displaytag-1.0-with-sortComparator-and-tld.zip
- 24/Oct/05 5:10 AM
- 26 kB
- Chidambaram Pl
-
- tld/displaytag-12.tld 34 kB
- java/.../SortComparatorInstantiationException.java 2 kB
- java/org/.../CaseInsensitiveRowSorter.java 8 kB
- java/org/.../model/HeaderCell.java 14 kB
- java/org/.../SortComparatorFactory.java 4 kB
- java/org/.../model/TableModel.java 12 kB
- java/org/displaytag/tags/ColumnTag.java 26 kB
- java/org/.../tags/ColumnTagBeanInfo.java 6 kB
Activity
Hide
Maarten Hogendoorn
added a comment -
This feature could be addressed more generically, by adding an attribute "sortComparator" to the display:column tag.
This optional sortComparator should then contain the class that implements a java.util.Comparator interface,
which sorts the specified column according to the order induced by the specified comparator.
This optional sortComparator should then contain the class that implements a java.util.Comparator interface,
which sorts the specified column according to the order induced by the specified comparator.
Show
Maarten Hogendoorn
added a comment - This feature could be addressed more generically, by adding an attribute "sortComparator" to the display:column tag.
This optional sortComparator should then contain the class that implements a java.util.Comparator interface,
which sorts the specified column according to the order induced by the specified comparator.
Show
Chidambaram Pl
added a comment - Attaching the sort comparator implementation.
Hide
Chidambaram Pl
added a comment -
Attaching sort comparator implementation along with tld file 'displaytag-1.0-with-sortComparator-and-tld.zip'
Show
Chidambaram Pl
added a comment - Attaching sort comparator implementation along with tld file 'displaytag-1.0-with-sortComparator-and-tld.zip'
Hide
Bruno Braga
added a comment -
You forgot of say that sortComparator="org.displaytag.model.CaseInsensitiveRowSorter"
AND ADD
->> public RowSorter(Integer sortedColumnIndex, String beanProperty, TableDecorator tableDecorator, Boolean ascendingOrder)
IN class org.displaytag.model.RowSorter
You factory class requires a Integer and Boolean in contructor, but RowSorter alone had int and boolean
Thank you for the implementation. Be need that.
Bruno Braga
AND ADD
->> public RowSorter(Integer sortedColumnIndex, String beanProperty, TableDecorator tableDecorator, Boolean ascendingOrder)
IN class org.displaytag.model.RowSorter
You factory class requires a Integer and Boolean in contructor, but RowSorter alone had int and boolean
Thank you for the implementation. Be need that.
Bruno Braga
Show
Bruno Braga
added a comment - You forgot of say that sortComparator="org.displaytag.model.CaseInsensitiveRowSorter"
AND ADD
->> public RowSorter(Integer sortedColumnIndex, String beanProperty, TableDecorator tableDecorator, Boolean ascendingOrder)
IN class org.displaytag.model.RowSorter
You factory class requires a Integer and Boolean in contructor, but RowSorter alone had int and boolean
Thank you for the implementation. Be need that.
Bruno Braga
Show
fabrizio giustina
added a comment - duplicate of DISPL-18
Hide
Mark Christopher ng
added a comment -
Hi
This is a usefull feature that i would also like to use except, it would be more flexible if the user could define the default comparator use in the in the .properties file so the case-insensitive sorting applies for all columns on all display tables used within our project.
Currently we just modified the rowSorter object to do something similar to your CaseInsensitvieRowSorter so it applies to all sorting. It would be cumbersome to add the sortCompartor="org.displaytag.model.CaseInsensitiveRowSorter" to about 100 colums within our project. Let me know what you think because it should be easy to implement.
This is a usefull feature that i would also like to use except, it would be more flexible if the user could define the default comparator use in the in the .properties file so the case-insensitive sorting applies for all columns on all display tables used within our project.
Currently we just modified the rowSorter object to do something similar to your CaseInsensitvieRowSorter so it applies to all sorting. It would be cumbersome to add the sortCompartor="org.displaytag.model.CaseInsensitiveRowSorter" to about 100 colums within our project. Let me know what you think because it should be easy to implement.
Show
Mark Christopher ng
added a comment - Hi
This is a usefull feature that i would also like to use except, it would be more flexible if the user could define the default comparator use in the in the .properties file so the case-insensitive sorting applies for all columns on all display tables used within our project.
Currently we just modified the rowSorter object to do something similar to your CaseInsensitvieRowSorter so it applies to all sorting. It would be cumbersome to add the sortCompartor="org.displaytag.model.CaseInsensitiveRowSorter" to about 100 colums within our project. Let me know what you think because it should be easy to implement.
Hide
fabrizio giustina
added a comment -
The DefaultComparator used in displaytag 1.1 is configured with a low strength so it will ignore case and accents by default (only if objects are already Strings). Should be ok now.
Show
fabrizio giustina
added a comment - The DefaultComparator used in displaytag 1.1 is configured with a low strength so it will ignore case and accents by default (only if objects are already Strings). Should be ok now.
I attached the diff file of my modifications. Anyone feel free to turn this into a real patch for displaytag.