cancel
Showing results for 
Search instead for 
Did you mean: 

Error in SAPUI5 sap.m.NumericContent Value - Binding with ODATA

Former Member

Hi Experts,

I am trying to bind the field "value" in sap.m.NumericContent with a value from ODATA service, I am getting '0' even if I get the value in the binding.

Please let me know how to bind the aggregation "content", since in other places I am able to bind similar aggregation properly but here the cardinality is 0..1 but I am passing the EntitySet in the XML View.

Kindly let me know how to bind a Entity in an aggregation with 0..1 cardinality. which may solve the issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member340030
Contributor
0 Kudos

Hi Selvaganesh Ilango ,

From backend service are you getting the data as an array of object containing only one element than the way you bind is correct but if its object structure instead of array than replace content with binding (this means you need to use element binding instead of content)

Check out this https://sapui5.hana.ondemand.com/1.36.7/docs/guide/91f05e8b6f4d1014b6dd926db0e91070.html for more reference ...

thanks

Viplove

Former Member
0 Kudos

Hi Viplove,

Thanks for the reply, I am using the local mock server only, hence I believe I would get the entries in an array since I am using the entity set.

Still I am not able to get the value binded to the property.

Thanks

former_member340030
Contributor
0 Kudos

Can you just provide your controller code too .. so that i can take a look .. and also in networks tab you can check whether the data is coming as an array or struct

thanks

Viplove

0 Kudos

HI i am having the same issue, could you please comment on how you solved this issue