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

Justin Mclean resolved FLEX-23680.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.11.0

Fixed by fix to FLEX-25369
                
> Sorting fails when a DataGridColumn uses a complex value for the dataField 
> attribute
> ------------------------------------------------------------------------------------
>
>                 Key: FLEX-23680
>                 URL: https://issues.apache.org/jira/browse/FLEX-23680
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Collections
>    Affects Versions: Adobe Flex SDK 4.0 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Internet Explorer 8.x
> Language Found: English
>            Reporter: Adobe JIRA
>             Fix For: Apache Flex 4.11.0
>
>
> Steps to reproduce:
> 1. Run attached sample
> 2. Apply a sort on the "Parent Name" column
> 3. Click the button at the bottom to trigger CollectionEvent.COLLECTION_CHANGE
>  
>  Actual Results:
>  Runtime error in the mx.collections.Sort class. DataGrid behaves 
> inconsistently thereafter
>  
>  Expected Results:
>  DataGrid UI should update with new value
>  
>  Workaround (if any):
>  Don't use DataGridColumns with a complex value for "dataField" even though 
> the framework supports it. Implement a labelFunction and sortCompareFunction 
> for the column
>  
>  More information:
> The DataGridColumn supports "complex" values for the dataField (eg 
> "parent.name") however this doesn't appear to be fully-supported by the Sort 
> class. When applying a sort on a column with a complex dataField and then 
> triggering PropertyChangeEvent.PROPERTY_CHANGE an error is thrown because 
> Sort can't handle a complex field name. The problem is line 506 of Sort where 
> it attempts to the evaluate the field name and marks that it cannot be found. 
> This doesn't always show up as a problem because 
> ListCollectionView.collectionEventHandler (line 2518) catches this error but 
> ListCollectionView.listChangeHandler (line 1300) doesn't catch it. This 
> behavior is inconsistent and should be looked at.  Ideally the Sort class 
> should be able to evaluate complex field names in the way that DataGridColumn 
> does, in set dataField (lines 461-485) and itemToLabel (lines 1680-1718).
>  
> Note: this was originally found in Flex SDK 3.5.0 but applies to Flex 4 also.

--
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

Reply via email to