Return-Path: X-Original-To: apmail-tapestry-dev-archive@www.apache.org Delivered-To: apmail-tapestry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77B5E10B3C for ; Mon, 10 Feb 2014 18:36:26 +0000 (UTC) Received: (qmail 41869 invoked by uid 500); 10 Feb 2014 18:36:23 -0000 Delivered-To: apmail-tapestry-dev-archive@tapestry.apache.org Received: (qmail 41765 invoked by uid 500); 10 Feb 2014 18:36:22 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 41698 invoked by uid 99); 10 Feb 2014 18:36:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Feb 2014 18:36:21 +0000 Date: Mon, 10 Feb 2014 18:36:21 +0000 (UTC) From: "Jochen Kemnade (JIRA)" To: commits@tapestry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (TAP5-2018) GridCollectionDataSource sorting behavior is confusing if multiple constraints are given MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)