on 05-20-2020 4:26 PM
Hello,
I do have the following Model:
function getExample(){
var model = {
"Model":[0:{"Title":"First", "Option":["Yes","No","Unknown"]},
1:{"Title":"Second", "Option":["Yes","No","Unknown"]},
2:{"Title":"Third", "Option":["Yes","No","Unknown"]}]
}
return model;
}
var oModelExample = new sap.ui.model.json.JSONModel();
this.setModel(oModelExample, "modelExample")
oModelExample.setData(getExample().Model)
That is bound to the View, and delievers the following Table:
Question: Users are going to choose one of the Options :Yes/No/Unknown.
1. What it is the very best way to save the selected Option to the Backend, so that later this result can be showcased ?
2. Does .getModel() deliever Model with it selected Options ?
JSONModel is a client-side model. It's not aware of and doesn't care about backend. If you have an OData service, v2/v4.ODataModel should be used.
Use the ODataModel together with TwoWay data binding. If the user changes something via the UI, the model will register the change automatically. From there, you can send the change to the backend directly with .submitChanges().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
9 | |
9 | |
7 | |
6 | |
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.