Skip to Content

Passing the data from one XML View to another XML View with out Router in SAP UI5

Hello Experts,

I have created the Main and Second XML views and I would like to send the from Main to Second with Element Binding with itemPress Event. When click on the Record, it is going to Second view and values are not available.

I am using the JSON Model with 10 records and I see all the records available in the Main View.

It would be great if you shower some information what mistake I am doing..

Thanks and Regards,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on May 13 at 04:04 AM

    Set the model to core using sap.ui.getCore().setModel() and access it in the other view.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 13 at 09:11 PM

    Hello, you have a range of options to do that:

    • Use Event Bus (I read really quick the blog that I referred, but this works across controllers from different pages, even with controllers from different apps when doing Component Usage).
    • Use a component model (defined in manifest.json); but you have to remember to clean after consumption or handle dirty data to avoid displaying wrong values.
    • You didn't showed your code, but if you are navigating with something that inherit NavContainer you can directly pass data on to method (your data is available on beforeShow event of target page).

    You can even be hardcore and transfer them using HTML5 Session Storage.

    Next time provide a snippet of your code that isn't working (in this case how you are doing havigation, and how you are trying to get data on target page) because your current code could be on right path and just needed a small tip.

    Best regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.