You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2013/01/22 22:42:27 UTC
svn commit: r1437191 -
/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
Author: cframpton
Date: Tue Jan 22 21:42:26 2013
New Revision: 1437191
URL: http://svn.apache.org/viewvc?rev=1437191&view=rev
Log:
FLEX-33248 again since the prior fix didn't work in all cases. DataGrid mustella tests all pass.
Modified:
flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
Modified: flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
URL: http://svn.apache.org/viewvc/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as?rev=1437191&r1=1437190&r2=1437191&view=diff
==============================================================================
--- flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as (original)
+++ flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as Tue Jan 22 21:42:26 2013
@@ -465,10 +465,8 @@ public class GridItemEditor extends Grou
var data:Object = data;
var typeInfo:String = "";
- // If a complex field reference need to get the parent object where the property
+ // If a complex field reference need to get the object where the property
// will be updated. It is a complex field reference if dataFieldPath.length > 1.
- // Note that if the path is incorrect there will be a ReferenceError either here or
- // when accessing the invalid property below.
var dataFieldPath:Array = column.dataFieldPath;
for (var i:int = 0; i < dataFieldPath.length - 1; i++)
data = data[dataFieldPath[i]];
@@ -532,7 +530,11 @@ public class GridItemEditor extends Grou
var oldData:Object = data[property];
data[property] = newData;
- dataGrid.dataProvider.itemUpdated(data, property, oldData, newData);
+
+ // If a complex field reference then the data and property local vars were modified and
+ // no longer point to the top-level data object and the complete path to the property
+ // so use the original values.
+ dataGrid.dataProvider.itemUpdated(this.data, column.dataField, oldData, newData);
// Restore the sort. The data will not be sorted due to this change.
if (sort)