on 03-02-2017 11:58 PM
I have below code which gets me 5 objects which are present in the model
var b = this.getView().getModel().getData().types;
When I check b[1].value I get empty value, which is fine.
Now I want to make the empty value to something like "abc" and put it back to the model. Can I know how can I put it back to the model ? Please assist.
Assuming this is ODATA model, you can use setProperty method
var oModel = this.getView().getModel();
oModel.setProperty("/types/1", "abc"); //path is referring to element in array with index 1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.