on 09-18-2014 11:25 AM
Hey,
I am trying to bind sapui5 controls to a json model using bind value & bind property as shown
miApprovalDatePicker.bindValue("UIModel>/issueDate");
miApprovalDatePicker.bindProperty("value","UIModel>/approvalDate");
UIModel is the json Model which i have declared in my onit: of controller as shown
var UIModelCore = new woodsoftui5.model.MaterialIssueOrder();
var UIModelJson = new sap.ui.model.json.JSONModel();
UIModelJson.setData(UIModelCore);
sap.ui.getCore().setModel(UIModelJson,"UIModel");
but i have a similar model which i use it to save data when i search using Ajax service where i am setting data to both UIModel & miModeljson
I am comparing if there is any change in UIModel & miModeljson in my save function as shown
miSave: function (showPrintOrder) {
var UIModel = sap.ui.getCore().getModel("UIModel");
/****Checking if there is any change in values in ui and values obtained from data base*******************/
if (!(_.isEqual(miModelJson.oData, UIModel.oData))) {.....Ajax call for save...}
the problem is that the values of the controls are also binding to miModelJson which i think a problem with twoWay binding which is new to me!!!!
The whole thing i am doing is to eliminate Ajax for Save,
please help...............
regards,
Raghu
thelJson
Sorry Raghu
I have difficulty understanding the issues that you are facing.
Are you trying to keep a copy of the data so that you can check if original data is changed?
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.