on 11-17-2015 7:00 PM
Sorry if I can't share the code in JBin , but the problem is with the data coming from oData with JSON works as expected.
I am binding the data from an oData model, everything works except for the value. If I hover the mouse cursor on the bar is see is displaying NaN.
var oCmprsDataTmpl = new sap.suite.ui.commons.ComparisonData({
title : "{Title}",
color : "{Color}",
value : "{Value}",
});
The entity field is declared as float and in the DB there are valid numbers, it is only not working in the binding.
I have tried many combinations but probably I am missing something that I can't find in the documentation...
Any ideas?
Many thanks!
SO
can you share how you are creating the model and setting the model to the view prior to binding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergio,
var sUrl = "https://localhost:8080/test/test.svc";
var oModelZ = new sap.ui.model.odata.ODataModel(sUrl);
this.setModel(oModelZ);
(I am using the conventions in the personslist scenario, adapted to my needs)
Thanks!
Best,
looks like the model path is needed..
var oModelZ = new sap.ui.model.odata.ODataModel(sUrl,true); // true - json
this.setModel(oModelZ, "path1");
what is the structure of your json response.. you need to have the path... seems like from your binding you have properties of an end point such as:
{
path1:[ { Title: 'T1', Color: 'C1', Value: 'v1' },
{ Title: 'T2', Color: 'C2', Value: 'v2' } ],
path2: {} // diff object
}
you need to have your path: path1 specified somewhere then your properties Title, Color, Value would display correctly
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.