Skip to Content
avatar image
Former Member

How to check data is present in the view in My SapUi5 App..??

my data is present in my controller as an object but its not getting displayed in my view why is that so and how to check whether data is present in the view.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 09, 2017 at 09:53 AM

    In case you bind data as model to a control or view, all dependents will inherit this model. The exception is, when you bind another model to one of the children.

    In order to check, which model is currently bound, use:

    console.table(this.getView().byId("yourControlId").getModel().getData());

    This code will fail in case there is no model.

    If you want to check from the dev console you need to use something similar to:

    console.table(sap.ui.getCore().byId("__xmlview1--yourControlId").getModel().getData())
    Add comment
    10|10000 characters needed characters exceeded