function _updateLayoutData() {

		var aFields = this.getFields().filter(function(oField) {
			return oField.getVisible();
		});
		var aDelemiters = this.getAggregation("_delimiters", []);
		var oFormContainer = this.getParent();
		var oForm = oFormContainer && oFormContainer.getParent();
		var oLayout = oForm && oForm.getLayout();
		var oLayoutData;
		var i = 0;

		if (!oLayout || !oLayout.getLayoutDataForDelimiter) {
			return;
		}

		if (this.getProperty("_editable")) {
			// delimiters
			for (i = 0; i < aDelemiters.length; i++) {
				var oDelimiter = aDelemiters[i];
				if (!oDelimiter.getLayoutData()) {
					// TODO: handle change of FormLayout
					oLayoutData = oLayout.getLayoutDataForDelimiter();
					if (oLayoutData) {
						if (oLayoutData instanceof Promise) {
							oLayoutData.then(function(oLayoutData) {
								oLayoutData._bSetBySemanticFormElement = true;
								this.setLayoutData(oLayoutData);
							}.bind(oDelimiter));
						} else if (oLayoutData.isA("sap.ui.core.LayoutData")) {
							oLayoutData._bSetBySemanticFormElement = true;
							oDelimiter.setLayoutData(oLayoutData);
						}
					}
				}
			}

			// fields (only if have no own LayoutData)
			if (aFields.length > 1) {
				// only if there are delimiters
				for (i = 0; i < aFields.length; i++) {
					var oField = aFields[i];
					oLayoutData = oField.getLayoutData();
					if (!oLayoutData || oLayoutData._bSetBySemanticFormElement) {
						oLayoutData = oLayout.getLayoutDataForSemanticField(aFields.length, i + 1, oLayoutData);
						if (oLayoutData) {
							if (oLayoutData instanceof Promise) {
								oLayoutData.then(function(oLayoutData) {
									oLayoutData._bSetBySemanticFormElement = true;
									this.setLayoutData(oLayoutData);
								}.bind(oField));
							} else if (oLayoutData.isA("sap.ui.core.LayoutData") && !oLayoutData._bSetBySemanticFormElement) { // if already set (just updated), don't need to set again
								oLayoutData._bSetBySemanticFormElement = true;
								oField.setLayoutData(oLayoutData);
							}
						}
					}
				}
			}

			this._bLayoutDataCreated = true; // to not check it on every getFieldsForRendering call
		}

	}
// the used Layout can be unknown. But latest on rendering it is known, so there the LayoutData can be set latest.
the used Layout can be unknown. But latest on rendering it is known, so there the LayoutData can be set latest.
the used Layout can be unknown . But latest on rendering it is known so there the LayoutData can be set latest .
function _updateLayoutData() {
		var aFields = this.getFields().filter(function(oField) {
			return oField.getVisible();
		});
		var aDelemiters = this.getAggregation("_delimiters", []);
		var oFormContainer = this.getParent();
		var oForm = oFormContainer && oFormContainer.getParent();
		var oLayout = oForm && oForm.getLayout();
		var oLayoutData;
		var i = 0;
		if (!oLayout || !oLayout.getLayoutDataForDelimiter) {
			return;
		}
		if (this.getProperty("_editable")) {
			for (i = 0; i < aDelemiters.length; i++) {
				var oDelimiter = aDelemiters[i];
				if (!oDelimiter.getLayoutData()) {
					oLayoutData = oLayout.getLayoutDataForDelimiter();
					if (oLayoutData) {
						if (oLayoutData instanceof Promise) {
							oLayoutData.then(function(oLayoutData) {
								oLayoutData._bSetBySemanticFormElement = true;
								this.setLayoutData(oLayoutData);
							}.bind(oDelimiter));
						} else if (oLayoutData.isA("sap.ui.core.LayoutData")) {
							oLayoutData._bSetBySemanticFormElement = true;
							oDelimiter.setLayoutData(oLayoutData);
						}
					}
				}
			}
			if (aFields.length > 1) {
				for (i = 0; i < aFields.length; i++) {
					var oField = aFields[i];
					oLayoutData = oField.getLayoutData();
					if (!oLayoutData || oLayoutData._bSetBySemanticFormElement) {
						oLayoutData = oLayout.getLayoutDataForSemanticField(aFields.length, i + 1, oLayoutData);
						if (oLayoutData) {
							if (oLayoutData instanceof Promise) {
								oLayoutData.then(function(oLayoutData) {
									oLayoutData._bSetBySemanticFormElement = true;
									this.setLayoutData(oLayoutData);
								}.bind(oField));
							} else if (oLayoutData.isA("sap.ui.core.LayoutData") && !oLayoutData._bSetBySemanticFormElement) { 
								oLayoutData._bSetBySemanticFormElement = true;
								oField.setLayoutData(oLayoutData);
							}
						}
					}
				}
			}
			this._bLayoutDataCreated = true; 
		}
	}
function _updateLayoutData ( ) { var aFields = this . getFields ( ) . filter ( function ( oField ) { return oField . getVisible ( ) ; } ) ; var aDelemiters = this . getAggregation ( "_delimiters" , [ ] ) ; var oFormContainer = this . getParent ( ) ; var oForm = oFormContainer && oFormContainer . getParent ( ) ; var oLayout = oForm && oForm . getLayout ( ) ; var oLayoutData ; var i = 0 ; if ( ! oLayout || ! oLayout . getLayoutDataForDelimiter ) { return ; } if ( this . getProperty ( "_editable" ) ) { for ( i = 0 ; i < aDelemiters . length ; i ++ ) { var oDelimiter = aDelemiters [ i ] ; if ( ! oDelimiter . getLayoutData ( ) ) { oLayoutData = oLayout . getLayoutDataForDelimiter ( ) ; if ( oLayoutData ) { if ( oLayoutData instanceof Promise ) { oLayoutData . then ( function ( oLayoutData ) { oLayoutData . _bSetBySemanticFormElement = true ; this . setLayoutData ( oLayoutData ) ; } . bind ( oDelimiter ) ) ; } else if ( oLayoutData . isA ( "sap.ui.core.LayoutData" ) ) { oLayoutData . _bSetBySemanticFormElement = true ; oDelimiter . setLayoutData ( oLayoutData ) ; } } } } if ( aFields . length > 1 ) { for ( i = 0 ; i < aFields . length ; i ++ ) { var oField = aFields [ i ] ; oLayoutData = oField . getLayoutData ( ) ; if ( ! oLayoutData || oLayoutData . _bSetBySemanticFormElement ) { oLayoutData = oLayout . getLayoutDataForSemanticField ( aFields . length , i + 1 , oLayoutData ) ; if ( oLayoutData ) { if ( oLayoutData instanceof Promise ) { oLayoutData . then ( function ( oLayoutData ) { oLayoutData . _bSetBySemanticFormElement = true ; this . setLayoutData ( oLayoutData ) ; } . bind ( oField ) ) ; } else if ( oLayoutData . isA ( "sap.ui.core.LayoutData" ) && ! oLayoutData . _bSetBySemanticFormElement ) { oLayoutData . _bSetBySemanticFormElement = true ; oField . setLayoutData ( oLayoutData ) ; } } } } } this . _bLayoutDataCreated = true ; } }
the used Layout can be unknown.
the used Layout can be unknown .
// delimiters // TODO: handle change of FormLayout // fields (only if have no own LayoutData) // only if there are delimiters // if already set (just updated), don't need to set again // to not check it on every getFieldsForRendering call