app/actions/editAction/editAction.js
function() {
        var editDataSource = this.getProperty( 'editDataSource' );
        var destinationDataSource = this.getProperty( 'destinationDataSource' );
        var destinationProperty = this.getProperty( 'destinationProperty' );

        if( this._isObjectDataSource( editDataSource ) ) {
            var editedItem = editDataSource.getSelectedItem();
            var originItem = destinationDataSource.getProperty( destinationProperty );

            if( this._isRootElementPath( destinationProperty ) ) {
                this._overrideOriginItem( originItem, editedItem );
                destinationDataSource._includeItemToModifiedSet( originItem );
                destinationDataSource.saveItem( originItem, function() {
                    destinationDataSource.updateItems();
                } );
            } else {
                destinationDataSource.setProperty( destinationProperty, editedItem );
            }

        } else {
            destinationDataSource.updateItems();
        }
    }
function() {
        var editDataSource = this.getProperty( 'editDataSource' );
        var destinationDataSource = this.getProperty( 'destinationDataSource' );
        var destinationProperty = this.getProperty( 'destinationProperty' );

        if( this._isObjectDataSource( editDataSource ) ) {
            var editedItem = editDataSource.getSelectedItem();
            var originItem = destinationDataSource.getProperty( destinationProperty );

            if( this._isRootElementPath( destinationProperty ) ) {
                this._overrideOriginItem( originItem, editedItem );
                destinationDataSource._includeItemToModifiedSet( originItem );
                destinationDataSource.saveItem( originItem, function() {
                    destinationDataSource.updateItems();
                } );
            } else {
                destinationDataSource.setProperty( destinationProperty, editedItem );
            }

        } else {
            destinationDataSource.updateItems();
        }
    }
function ( ) { var editDataSource = this . getProperty ( 'editDataSource' ) ; var destinationDataSource = this . getProperty ( 'destinationDataSource' ) ; var destinationProperty = this . getProperty ( 'destinationProperty' ) ; if ( this . _isObjectDataSource ( editDataSource ) ) { var editedItem = editDataSource . getSelectedItem ( ) ; var originItem = destinationDataSource . getProperty ( destinationProperty ) ; if ( this . _isRootElementPath ( destinationProperty ) ) { this . _overrideOriginItem ( originItem , editedItem ) ; destinationDataSource . _includeItemToModifiedSet ( originItem ) ; destinationDataSource . saveItem ( originItem , function ( ) { destinationDataSource . updateItems ( ) ; } ) ; } else { destinationDataSource . setProperty ( destinationProperty , editedItem ) ; } } else { destinationDataSource . updateItems ( ) ; } }
save item in destination data source
save item in destination data source