Hello DrSubhabaha,
The Problem here is that you are trying to access the Value of the Control with its id, but you are using the wrong ID here.
The ID of sapui5 controls is constructed with the id of the view + the id of the control.
So if you want to access the control with the sap.ui.getCore().byId("id") method you have to use the full id of the control (which you can see in the DOM) which consists of viewId + controlId.
The correct way to access Controls inside a particular view is to first get a reference to the view
var oView = this.getView();
And then use the reference of the view to access your control.
oView.byId("id");This way you can specify the control by the id you just set in your View Definition.
So in your case it would look like this:
handleUpdate : function (evt) { //assuming you bind the eventHandler with the context of the controller var oView = this.getView(); // show confirmation dialog var bundle = this.getView().getModel("i18n").getResourceBundle(); sap.m.MessageBox.confirm( bundle.getText("UpdateDialogMsg"), function (oAction) { if (sap.m.MessageBox.Action.OK === oAction) { var var_menge = oView.byId("Vmenge").getValue(); var var_preis = oView.byId("Vpreis").getValue(); var successMsg = bundle.getText("UpdateDialogSuccessMsg"); sap.m.MessageToast.show(successMsg); // TODO call proper service method and update model (not part of this session) } }, bundle.getText("UpdateDialogTitle") ); },with best regards
Florian