flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-32221) Sorting with non-existing dataField and custom sortCompareFunction
Date Wed, 06 Aug 2014 02:12:11 GMT

    [ https://issues.apache.org/jira/browse/FLEX-32221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087123#comment-14087123

Sandun commented on FLEX-32221:

I am trying this workaround in flex 4.13.0
Copied internal refresh parts to overridden refresh function and also created sortCanBeApplied
in the subclass  FixedHierarchicalCollectionView.

However  (Line 1167) in HierarchicalCollectionView you have the following
   // if filter is applied to any collection, only then update the length
        if (needUpdate)
            updateLength();  // length will change after filtering, so update it.
updateLength() is a private function updating private property currentLength

Has anyone tried this workaround in the current flex SDK?

> Sorting with non-existing dataField and custom sortCompareFunction
> ------------------------------------------------------------------
>                 Key: FLEX-32221
>                 URL: https://issues.apache.org/jira/browse/FLEX-32221
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Adobe JIRA
>            Priority: Minor
>             Fix For: Adobe Flex SDK Previous
> I have written a CustomDataGridColumn which extends AdvancedDataGridColumn. It allows
the usage of nested objects in the dataField (e.g. dataField="name.de_DE"). The custom column
uses a labelFunction and sortCompareFunction to display the correct value. However, the sorting
doesn't work.
> Steps to reproduce:
> 1. Compile the provided test case and debug it.
> 2. Open some nodes in the left ADG and sort a column.
> 3. Open some nodes in the right (custom) ADG and sort a column.
>  Actual Results:
>  The values in the left grid are not sorted even though the column shows the sort arrow.
The custom grid on the right side allows sorting.
>  Expected Results:
>  The sorting should always work when a custom sortCompareFunction is used regardless
of the existance of the dataField.
>  Workaround (if any):
>  I had to extend the ADG in order to provide a new implementation of HierarchicalCollectionView
(FixedHierarchicalCollectionView) in the constructor. Furthermore I had to override refresh()
and  copy some parts of internalRefresh() and sortCanBeApplied() into my new class. In sortCanBeApplied()
I added a check for a compareFunction (line 82). After those changes the sorting works quite

This message was sent by Atlassian JIRA

View raw message