Skip to Content
avatar image
Former Member

SAPUI5 - Set Model of view2 from view1 controller

Hi,

I have two views with two tables (a table in each view) - both views are visible at start.

The trigger for the servlet is the "onInit" of view1 controller.

The servlet (which returns two json arrays) sets view1 model.

How do I set view2 model ?

Aviad

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 05, 2017 at 09:44 PM

    are u using component based development?

    if yes, you set the model to component, model will be available to all view

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2017 at 06:15 AM

    Use this.byId("ViewID").setModel(<JSON MODEL>) - You can set JSON model to view or table....

    Add comment
    10|10000 characters needed characters exceeded