sap.ui.define([
"ea/zcertemp/controller/BaseController",
"sap/m/MessageToast",
"sap/m/MessageBox"
],
function (BaseController, MessageToast, MessageBox) {
...
onUpdate: function () {
const oModel = this.getView().getModel();
const oSmartForm = this.getView().byId("SF1");
if(oSmartForm.check().length > 0)
return;
oModel.submitChanges({
success: function () {
MessageToast.show("성공적으로 업데이트되었습니다.");
oSmartForm.setEditable(false);
}.bind(this),
error: function (oError) {
var oMsg = JSON.parse(oError.responseText);
MessageBox.error(oMsg.error.message.value);
}
});
}