function update(oControl, aContexts, fnBefore, fnAfter) {
			var aChildren = oControl[oAggregationInfo._sGetter]() || [],
				oContext,
				oClone;
			if (aChildren.length > aContexts.length) {
				for (var i = aContexts.length; i < aChildren.length; i++) {
					oClone = aChildren[i];
					oControl[oAggregationInfo._sRemoveMutator](oClone);
					oClone.destroy("KeepDom");
				}
			}
			for (var i = 0; i < aContexts.length; i++) {
				oContext = aContexts[i];
				oClone = aChildren[i];
				if (fnBefore) {
					fnBefore(oContext);
				}
				if (oClone) {
					oClone.setBindingContext(oContext, oBindingInfo.model);
				} else {
					oClone = fnFactory(getIdSuffix(oControl, i), oContext);
					oClone.setBindingContext(oContext, oBindingInfo.model);
					oControl[oAggregationInfo._sMutator](oClone);
				}
				if (fnAfter) {
					fnAfter(oContext, oClone);
				}
			}
		}
function update(oControl, aContexts, fnBefore, fnAfter) {
			var aChildren = oControl[oAggregationInfo._sGetter]() || [],
				oContext,
				oClone;
			if (aChildren.length > aContexts.length) {
				for (var i = aContexts.length; i < aChildren.length; i++) {
					oClone = aChildren[i];
					oControl[oAggregationInfo._sRemoveMutator](oClone);
					oClone.destroy("KeepDom");
				}
			}
			for (var i = 0; i < aContexts.length; i++) {
				oContext = aContexts[i];
				oClone = aChildren[i];
				if (fnBefore) {
					fnBefore(oContext);
				}
				if (oClone) {
					oClone.setBindingContext(oContext, oBindingInfo.model);
				} else {
					oClone = fnFactory(getIdSuffix(oControl, i), oContext);
					oClone.setBindingContext(oContext, oBindingInfo.model);
					oControl[oAggregationInfo._sMutator](oClone);
				}
				if (fnAfter) {
					fnAfter(oContext, oClone);
				}
			}
		}
function update ( oControl , aContexts , fnBefore , fnAfter ) { var aChildren = oControl [ oAggregationInfo . _sGetter ] ( ) || [ ] , oContext , oClone ; if ( aChildren . length > aContexts . length ) { for ( var i = aContexts . length ; i < aChildren . length ; i ++ ) { oClone = aChildren [ i ] ; oControl [ oAggregationInfo . _sRemoveMutator ] ( oClone ) ; oClone . destroy ( "KeepDom" ) ; } } for ( var i = 0 ; i < aContexts . length ; i ++ ) { oContext = aContexts [ i ] ; oClone = aChildren [ i ] ; if ( fnBefore ) { fnBefore ( oContext ) ; } if ( oClone ) { oClone . setBindingContext ( oContext , oBindingInfo . model ) ; } else { oClone = fnFactory ( getIdSuffix ( oControl , i ) , oContext ) ; oClone . setBindingContext ( oContext , oBindingInfo . model ) ; oControl [ oAggregationInfo . _sMutator ] ( oClone ) ; } if ( fnAfter ) { fnAfter ( oContext , oClone ) ; } } }
Update a single aggregation with the array of contexts. Reuse existing children and just append or remove at the end, if some are missing or too many.
Update a single aggregation with the array of contexts . Reuse existing children and just append or remove at the end if some are missing or too many .
Updates the binding context of the control