lib/ui5/controller/Cultivar_Create.controller.js in fiveapples-0.0.2 vs lib/ui5/controller/Cultivar_Create.controller.js in fiveapples-0.0.3
- old
+ new
@@ -19,23 +19,21 @@
var oModel = oView.getModel();
var oEntry = {};
oEntry.name = this.byId('name').getValue();
- oEntry.common_name = this.byId('common_name').getValue();
oEntry.year = this.byId('year').getValue();
- oEntry.breeder_ID = this.byId('breeder_ID').getValue();
+ oEntry.breeder_id = this.byId('breeder_id').getValue();
var _that = this;
function onSuccessHandler(data){
oModel.refresh();
_that.byId('name').setValue("");
- _that.byId('common_name').setValue("");
_that.byId('year').setValue("");
- _that.byId('breeder_ID').setValue("");
+ _that.byId('breeder_id').setValue("");
MessageToast.show("Create success");
- _that._oRouter.navTo( "cultivar_detail", {ID: data.ID} );
+ _that._oRouter.navTo( "cultivar_detail", {id: data.id} );
}
function onErrorHandler(){
MessageToast.show("Create failed"); }
oModel.create( sObjectPath, oEntry,
@@ -56,10 +54,10 @@
},
inputId : "",
inputDescrId: "",
- onBreederIDValueHelp : function (oEvent) {
+ onBreederIdValueHelp : function (oEvent) {
this.inputId = oEvent.getSource().getId();
this.inputDescrId = this.inputId + "_descr";
// create value help dialog