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 2015/03/17 09:08:38 UTC

[jira] [Closed] (TAP5-2018) GridCollectionDataSource sorting behavior is confusing if multiple constraints are given

     [ https://issues.apache.org/jira/browse/TAP5-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade closed TAP5-2018.
--------------------------------
    Resolution: Won't Fix

I guess this is only confusing *me*.

> 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
>            Assignee: 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.3.4#6332)