on 02-16-2015 6:23 AM
Hi,
I have created a generic tile with numeric content. Now for the value property i should get value from OData model..
i wrote the following code..but it is displaying value as '0'..
var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZAVGS_SRV_01/", true);
this.getView().setModel(oModel);
var ocore = sap.ui.getCore();
var t11 = ocore.byId("avg");
t11.bindProperty("value","/LtAvgsSet/avg");
Here, I want to get value of field avg from table..and set that to numeric content of tile..
Can anybody help ??
I solved it using bindElement method..
bulls.bindProperty("value", "SchImp");
bulls.bindElement("/LtAvgsSet/0");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
does /sap/opu/odata/sap/ZAVGS_SRV_01/LtAvgsSet have a right value in avg when you call it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii,
Yes, it has the value..
I tried binding from the view also..but the value is displayed as 0
var bulls = new sap.suite.ui.commons.NumericContent("impactsavg",{
size : sap.suite.ui.commons.InfoTileSize.Auto,
value : "{SchImp}",
scale : " ",
valueColor : sap.suite.ui.commons.InfoTileValueColor.Good,
});
bulls.setModel(oModel);
Hi,
Are you sure it is of string type?
first Try with hard code and check what kind of values it is accepting. I used ComparisonData for which I got issues to display with String values.
I suspect it will be of same error in your case as well.
From debugging , try to set values and check.
Regards,
Koti Reddy
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.