[
https://issues.apache.org/jira/browse/TAP5-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jochen Kemnade updated TAP5-2018:
---------------------------------
Labels: patch test (was: )
> GridCollectionDataSource sorting behavior is confusing if multiple
> constraints are given
> ----------------------------------------------------------------------------------------
>
> Key: TAP5-2018
> URL: https://issues.apache.org/jira/browse/TAP5-2018
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Jochen Kemnade
> Labels: patch, test
> Attachments:
> 0001-when-there-are-multiple-sort-constraints-given-apply.patch
>
>
> If multiple sort constraints are passed to CollectionGridDataSource#prepare,
> a Comparator is created for every constraint and they are applied one after
> another. That leads to only the last comparator affecting the resulting order
> which is at least confusing.
> The Comparators should be combined into a chain, each element returning
> either its own result if it is different from 0 or the next element's result.
> See also
> http://stackoverflow.com/questions/1421322/how-do-i-sort-a-list-with-multiple-sort-parameters
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)