on 07-25-2017 10:58 AM
Hello Experts,
I am reading one Odata entity set with some Filter Parameter and trying to set the response values in to local json model. I am unable to get any values in local json model although entity set call is working fine ( seen in debugger "Network " tab).
Response is coming in below structure:
{d: {,...}}
d:{,...}
results:[{__metadata:{,...},
0:{__metadata:{,..}
1:{--metadata"{,..}
I need to bind the values to table in XML View and populate multiple Line Items.
Can anyone help me with code/resolution for the same.
Thanks,
Anjana
Need to see your code to undestand the real issue, but you can use the given code to read the oData and to set model to the view.
Then in you XML view you need to bind properties.
your_oModel.read("/entityname",["YourParameters"], {
fnSuccess: jQuery.proxy(function(oData) {
//onRead success
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(oData);
this.getView().setModel(oModel);
/* You can perform rest of the activities here
*
* /
}, this),
fnError: $.proxy(function(xhr) {
//perfom your action on error
}, this)
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
your code please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any reason why you are not using the odata model? Seems it would make this easier.
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.