Skip to Content
0

how to check if data model is empty?

Jan 09, 2017 at 07:42 PM

346

avatar image
Former Member

I have an SAPUI5 app and I'm getting the data from the back-end using an OData model. I I get the OData model, convert it to a JSON model and then bind it to the xml view. I pass in an input to the back end when I make the call and get the data I'm requesting based on that input. If there is no data corresponding to that input, nothing is returned. How can I check the oData or JSON model if there is no data being returned? I would like to perform a check before I try to bind it to the view.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jun Wu Jan 09, 2017 at 07:56 PM
0

just put a break point in your success function of the ajax call.

check what is returned there, you may also have to check with the backend developer what they designed to return.

Share
10 |10000 characters needed characters left characters exceeded