You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2012/10/25 13:25:12 UTC
[jira] [Created] (TAP5-2018) GridCollectionDataSource sorting
behavior is confusing if multiple constraints are given
Jochen Kemnade created TAP5-2018:
------------------------------------
Summary: 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
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira