[ http://jira.codehaus.org/browse/DISPL-306?page=all ]

andy pruitt resolved DISPL-306.
-------------------------------

    Resolution: Fixed

Fixed in head; added new property to control the default comparator

> Ability to set default comparator for sorting String columns
> ------------------------------------------------------------
>
>                 Key: DISPL-306
>                 URL: http://jira.codehaus.org/browse/DISPL-306
>             Project: DisplayTag
>          Issue Type: Improvement
>          Components: Paging/Sorting
>            Reporter: Tim Fennell
>             Fix For: 1.2
>
>
> The ability to use custom comparators for sorting in DT1.1 is a big step 
> forward.  However, for sites with lots of tables it would be really nice to 
> be able to specify a default comparator other than the DefaultComparator 
> included in display tag.  This way you could define the comparator class to 
> be used once, and not have to repeat it on every single table and column 
> where it was needed.
> I should state that ideally the setting would be displaytag.properties and 
> would only set the default for sorting Strings!  The fact that DisplayTag 
> correctly sorts numbers (and other rich types?) correctly in DT1.1 is great, 
> and I wouldn't want to have to reimplement the type-detection code etc.
> The reason I'd like to be able to do this is to be able to sort strings in a 
> more human-orienteded manner.  For example Mac OS X will sort the values 
> "foo1", "foo2" and "foo10" in the order given, NOT "foo1", "foo10", "foo2" 
> which is correct if you are doing a strict alpha-numeric character sort.  Of 
> course if the DefaultComparator were enhanced to include such logic then that 
> would meet my needs pretty well too!  For a longer discussion on sorting of 
> Strings and an example of the comparator I'd like to use check out:
>     
> http://jroller.com/page/tfenne?entry=humanestringcomparator_sorting_strings_for_people

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to