function refreshDataState (sName, oDataState) {
		if (oDataState.getChanges().messages && this.getBinding(sName) && this.getBinding(sName).isA("sap.ui.model.PropertyBinding")) {
			var aMessages = oDataState.getMessages();
			var aLabels = LabelEnablement.getReferencingLabels(this);
			var sLabelId = aLabels[0];
			var bForceUpdate = false;

			aMessages.forEach(function(oMessage) {
				if (aLabels && aLabels.length > 0) {
				// we simply take the first label text and ignore all others
					var oLabel = sap.ui.getCore().byId(sLabelId);
					if (oLabel.getMetadata().isInstanceOf("sap.ui.core.Label") && oLabel.getText && oMessage.getAdditionalText() !== oLabel.getText()) {
						oMessage.setAdditionalText(oLabel.getText());
						bForceUpdate = true;
					} else {
						Log.warning(
							"sap.ui.core.message.Message: Can't create labelText." +
							"Label with id " + sLabelId + " is no valid sap.ui.core.Label.",
							this
						);

					}
				}
				if (oMessage.getControlId() !== this.getId()){
					oMessage.addControlId(this.getId());
					bForceUpdate = true;
				}
			}.bind(this));
			// Update the model to apply the changes
			var oMessageModel = sap.ui.getCore().getMessageManager().getMessageModel();
			oMessageModel.checkUpdate(bForceUpdate, true);

			// propagate messages
			if (aMessages && aMessages.length > 0) {
				var oMessage = aMessages[0];
				// check if the message type is a valid sap.ui.core.ValueState
				if (ValueState[oMessage.type]) {
					this.setValueState(oMessage.type);
					this.setValueStateText(oMessage.message);
				}
			} else {
				this.setValueState(ValueState.None);
				this.setValueStateText('');
			}
		}
	}
/**
	 * If messages are present:
	 * - Adds an additional text to the message from the label(s) of the corresponding control instance
	 * - Adds the control ID to the messages
	 * - Propagates the value state
	 */
If messages are present:
- Adds an additional text to the message from the label(s) of the corresponding control instance
- Adds the control ID to the messages
- Propagates the value state
If messages are present : - Adds an additional text to the message from the label ( s ) of the corresponding control instance - Adds the control ID to the messages - Propagates the value state
function refreshDataState (sName, oDataState) {
		if (oDataState.getChanges().messages && this.getBinding(sName) && this.getBinding(sName).isA("sap.ui.model.PropertyBinding")) {
			var aMessages = oDataState.getMessages();
			var aLabels = LabelEnablement.getReferencingLabels(this);
			var sLabelId = aLabels[0];
			var bForceUpdate = false;
			aMessages.forEach(function(oMessage) {
				if (aLabels && aLabels.length > 0) {
					var oLabel = sap.ui.getCore().byId(sLabelId);
					if (oLabel.getMetadata().isInstanceOf("sap.ui.core.Label") && oLabel.getText && oMessage.getAdditionalText() !== oLabel.getText()) {
						oMessage.setAdditionalText(oLabel.getText());
						bForceUpdate = true;
					} else {
						Log.warning(
							"sap.ui.core.message.Message: Can't create labelText." +
							"Label with id " + sLabelId + " is no valid sap.ui.core.Label.",
							this
						);
					}
				}
				if (oMessage.getControlId() !== this.getId()){
					oMessage.addControlId(this.getId());
					bForceUpdate = true;
				}
			}.bind(this));
			var oMessageModel = sap.ui.getCore().getMessageManager().getMessageModel();
			oMessageModel.checkUpdate(bForceUpdate, true);
			if (aMessages && aMessages.length > 0) {
				var oMessage = aMessages[0];
				if (ValueState[oMessage.type]) {
					this.setValueState(oMessage.type);
					this.setValueStateText(oMessage.message);
				}
			} else {
				this.setValueState(ValueState.None);
				this.setValueStateText('');
			}
		}
	}
function refreshDataState ( sName , oDataState ) { if ( oDataState . getChanges ( ) . messages && this . getBinding ( sName ) && this . getBinding ( sName ) . isA ( "sap.ui.model.PropertyBinding" ) ) { var aMessages = oDataState . getMessages ( ) ; var aLabels = LabelEnablement . getReferencingLabels ( this ) ; var sLabelId = aLabels [ 0 ] ; var bForceUpdate = false ; aMessages . forEach ( function ( oMessage ) { if ( aLabels && aLabels . length > 0 ) { var oLabel = sap . ui . getCore ( ) . byId ( sLabelId ) ; if ( oLabel . getMetadata ( ) . isInstanceOf ( "sap.ui.core.Label" ) && oLabel . getText && oMessage . getAdditionalText ( ) !== oLabel . getText ( ) ) { oMessage . setAdditionalText ( oLabel . getText ( ) ) ; bForceUpdate = true ; } else { Log . warning ( "sap.ui.core.message.Message: Can't create labelText." + "Label with id " + sLabelId + " is no valid sap.ui.core.Label." , this ) ; } } if ( oMessage . getControlId ( ) !== this . getId ( ) ) { oMessage . addControlId ( this . getId ( ) ) ; bForceUpdate = true ; } } . bind ( this ) ) ; var oMessageModel = sap . ui . getCore ( ) . getMessageManager ( ) . getMessageModel ( ) ; oMessageModel . checkUpdate ( bForceUpdate , true ) ; if ( aMessages && aMessages . length > 0 ) { var oMessage = aMessages [ 0 ] ; if ( ValueState [ oMessage . type ] ) { this . setValueState ( oMessage . type ) ; this . setValueStateText ( oMessage . message ) ; } } else { this . setValueState ( ValueState . None ) ; this . setValueStateText ( '' ) ; } } }
If messages are present:
 - Adds an additional text to the message from the label(s) of the corresponding control instance
 - Adds the control ID to the messages
 - Propagates the value state
If messages are present : - Adds an additional text to the message from the label ( s ) of the corresponding control instance - Adds the control ID to the messages - Propagates the value state
// we simply take the first label text and ignore all others // Update the model to apply the changes // propagate messages // check if the message type is a valid sap.ui.core.ValueState