Skip to Content
0

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

Jul 07, 2017 at 02:37 AM

172

avatar image
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.

capture.jpg (49.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

VIPLOVE KHUSHALANI Jul 07, 2017 at 01:24 PM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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

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

0