on 2014 Dec 30 7:14 PM
Hi Experts,
I called the xacute query in ajax and tried to bind with sap ui table.
But I could not get json data from query template,Instead it ruturning result as [object,object],[object,object],[object,object]
With static data Ui5 table is working fine but if bind it following way is working .
Pls help me to resolve it.
var oModel = new sap.ui.model.json.JSONModel();
$.ajax({
type: "POST",
success: function (data) {
alert("ok"+data);
var rows = data.Rowsets.Rowset[0].Row;
alert("rows"+rows);// returning object...... instead of actual results...
oModel.setData({modelData: rows});
oTable.setModel(oModel);
oTable.bindRows("/modelData");
},
error: function (err) {
alert("Local error callback.");
}
});//ajax close
Regards,
Raj.
Request clarification before answering.
Hi Raj,
How are you binding the columns?
Basically, data.Rowsets.Rowset[0].Row gives json output only. You need to bound elements using names you get under object[]of the row.
Let's say a column in Rowset[0] is "name", then columns in ui.table should be binded as "{name}".
Hope this helps.
Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.