src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/App.controller.js
function(oEvent) {
				var that = this;
				var oPressedButton = oEvent.getSource();

				that._oFeedbackDialog.ratingBar.forEach(function(oRatingBarElement) {
					if (oPressedButton !== oRatingBarElement.button) {
						oRatingBarElement.button.setPressed(false);
					} else {
						if (!oRatingBarElement.button.getPressed()) {
							setRatingStatus("None", "", 0);
						} else {
							switch (oRatingBarElement.status) {
								case "Excellent":
									setRatingStatus("Success", oRatingBarElement.status, 5);
									break;
								case "Good":
									setRatingStatus("Success", oRatingBarElement.status, 4);
									break;
								case "Average":
									setRatingStatus("None", oRatingBarElement.status, 3);
									break;
								case "Poor":
									setRatingStatus("Warning", oRatingBarElement.status, 2);
									break;
								case "Very Poor":
									setRatingStatus("Error", oRatingBarElement.status, 1);
							}
						}
					}
				});

				function setRatingStatus(sState, sText, iValue) {
					that._oFeedbackDialog.ratingStatus.setState(sState);
					that._oFeedbackDialog.ratingStatus.setText(sText);
					that._oFeedbackDialog.ratingStatus.value = iValue;
					if (iValue) {
						that._oFeedbackDialog.sendButton.setEnabled(true);
					} else {
						that._oFeedbackDialog.sendButton.setEnabled(false);
					}
				}
			}
function(oEvent) {
				var that = this;
				var oPressedButton = oEvent.getSource();

				that._oFeedbackDialog.ratingBar.forEach(function(oRatingBarElement) {
					if (oPressedButton !== oRatingBarElement.button) {
						oRatingBarElement.button.setPressed(false);
					} else {
						if (!oRatingBarElement.button.getPressed()) {
							setRatingStatus("None", "", 0);
						} else {
							switch (oRatingBarElement.status) {
								case "Excellent":
									setRatingStatus("Success", oRatingBarElement.status, 5);
									break;
								case "Good":
									setRatingStatus("Success", oRatingBarElement.status, 4);
									break;
								case "Average":
									setRatingStatus("None", oRatingBarElement.status, 3);
									break;
								case "Poor":
									setRatingStatus("Warning", oRatingBarElement.status, 2);
									break;
								case "Very Poor":
									setRatingStatus("Error", oRatingBarElement.status, 1);
							}
						}
					}
				});

				function setRatingStatus(sState, sText, iValue) {
					that._oFeedbackDialog.ratingStatus.setState(sState);
					that._oFeedbackDialog.ratingStatus.setText(sText);
					that._oFeedbackDialog.ratingStatus.value = iValue;
					if (iValue) {
						that._oFeedbackDialog.sendButton.setEnabled(true);
					} else {
						that._oFeedbackDialog.sendButton.setEnabled(false);
					}
				}
			}
function ( oEvent ) { var that = this ; var oPressedButton = oEvent . getSource ( ) ; that . _oFeedbackDialog . ratingBar . forEach ( function ( oRatingBarElement ) { if ( oPressedButton !== oRatingBarElement . button ) { oRatingBarElement . button . setPressed ( false ) ; } else { if ( ! oRatingBarElement . button . getPressed ( ) ) { setRatingStatus ( "None" , "" , 0 ) ; } else { switch ( oRatingBarElement . status ) { case "Excellent" : setRatingStatus ( "Success" , oRatingBarElement . status , 5 ) ; break ; case "Good" : setRatingStatus ( "Success" , oRatingBarElement . status , 4 ) ; break ; case "Average" : setRatingStatus ( "None" , oRatingBarElement . status , 3 ) ; break ; case "Poor" : setRatingStatus ( "Warning" , oRatingBarElement . status , 2 ) ; break ; case "Very Poor" : setRatingStatus ( "Error" , oRatingBarElement . status , 1 ) ; } } } } ) ; function setRatingStatus ( sState , sText , iValue ) { that . _oFeedbackDialog . ratingStatus . setState ( sState ) ; that . _oFeedbackDialog . ratingStatus . setText ( sText ) ; that . _oFeedbackDialog . ratingStatus . value = iValue ; if ( iValue ) { that . _oFeedbackDialog . sendButton . setEnabled ( true ) ; } else { that . _oFeedbackDialog . sendButton . setEnabled ( false ) ; } } }
Event handler for the rating to update the label and the data
@param {sap.ui.base.Event}
Event handler for the rating to update the label and the data