Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Passing Json Model from one controller to another controller


We are extending the Price and Availability app.

We have two views S2 and S3.

S2 is a search screen where we input some values and on click of a button, we need to show the gateway results in S3 which is a detail screen

We have a S2 controller where in the action handler, we are calling a gateway service and creating a json model for the odata results.

Now, we want to use the results in S3 view. How to get the json model in S3. We are aware that we can get it in S3 Controller using sap.ui.getCore.getModel('Modelname');

But our question is in which method of controller, I need to call the getCore statement. I tried in init() method of S3 but it is called before the action handler of S2.

My requirement is I need to bind the results to S3 view which are retreived in S2 controller.

I am attaching the files of S2 and S3 for your reference. Please help.


V (1144 B)
Former Member
Not what you were looking for? View more on this topic or Ask a question