From: <Se...@us...> - 2009-05-23 01:00:50
|
Revision: 3869 http://jaffa.svn.sourceforge.net/jaffa/?rev=3869&view=rev Author: SeanZ Date: 2009-05-23 01:00:43 +0000 (Sat, 23 May 2009) Log Message: ----------- handles the sub store inside of a record in getModifiedGraphNode() Modified Paths: -------------- trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js Modified: trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js =================================================================== --- trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js 2009-05-23 00:24:36 UTC (rev 3868) +++ trunk/JaffaRIA/source/html/js/extjs/jaffa/component/Component.js 2009-05-23 01:00:43 UTC (rev 3869) @@ -229,6 +229,7 @@ }, store); // copy over the deleted graphs + if (origGraph) for (var i=0; i<origGraph.length; i++) { if (origGraph[i].deleteObject) { // find matching object in newGraph @@ -388,7 +389,7 @@ * Iteratively construct a graph tree for updating the modified/created/deleted records in a tree store. The process * started from a record in a tree store. The result is a graph tree object. * - * @param {Ext.data.Record} rec a record inside of an tree store @link {Ext.ux.maximgb.treegrid.AbstractTreeStore} + * @param {Jaffa.data.Record} rec a record inside of an tree store @link {Ext.ux.maximgb.treegrid.AbstractTreeStore} * @param {Object} oGraph a javascript object of original data * @param {ClassMetaData} metaClass meta data of the graph object class. metaClass should have * 'key' to indicate the id field, 'childrenFieldName'. If 'siblingOrderFieldName' @@ -433,6 +434,19 @@ } } + // update the arrays of items in graph from sub stores in the record + var subNames = rec.getSubStoreNames(); + if (subNames) { + for (var i=0; i<subNames.length; i++) { + var subStore = rec.getSubStore(subNames[i]); + if (subStore) { + if (! nGraph[subNames[i]]) nGraph[subNames[i]] = []; + if (this.getModifiedPanelStore(oGraph[subNames[i]], nGraph[subNames[i]], subStore, subStore.metaClass)) + nGraph.isChanged = true; + } + } + } + // prune the deleted child graph this.pruneDeletedNestedGraphs(oGraph, nGraph, rec.store, metaClass); return nGraph; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |