Skip to Content
author's profile photo Former Member
Former Member

How to update the Content of a View while navigating and using Global paramters in SAPUI5

Good morning everyone,

I have been struggling with a problem since a couple of days. It is about updating a View using Global parameters just after the navigation process. In order for you to better understand my problem, let me explain my scenario. I developed an application which has as root element the App control. The App control now adds new Views as Pages using addPage() and performs the navigation using its methods "to" and "backToPage". In total I have three Views. The FIRST View is just a StandardTile, when the user clicks on it he navigates to the SECOND VIEW which will display a Table using the sap.ui.table.Table control. This table calls a Gateway OData Service to retrieve the business data using a function import. When the user now clicks on a table row, he will navigate to the THIRD View which will display another set of data using sap.ui.table.TreeTable based on some key parameters(two parameters) on the PREVIOUS SELECTED row which I store as GLOBAL OBJECTS after extracting them from the Row Binding Context. So the TreeTable control will call another function import from the SAME Gateway OData Service with these passed TWO GLOBAL PARAMETERS. The navigation is actually WORKING but my PROBLEM is that when I navigate back from the THIRD VIEW to the SECOND VIEW and I choose ANOTHER ROW, the DATA displayed in the THIRD VIEW(TreeTable) are the ONES of the PREVIOUS SELECTED ROW. The GLOBAL parameters are UPDATED BUT the method "createContent" of the THIRD VIEW is NOT called again, I mean it is the OLD content that is still displayed. How can I solve it? I thought about DESTROYING the View before I navigate back, it did NOT work. How to FORCE the application to Create the VIEW content again, I mean going through the createContent again? Please be TOLERANT with me, I am still a LEARNER. Have a great day and stay blessed 😊 😊 😊

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2016 at 10:58 AM


    If I got you correctly, following may help you - Why not create a model while navigating from 2nd to 3rd view. if you come back and select a different row, it will update the old model with new values, hence refreshing your 3rd view.


    Chandan Kalita

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Chandan,

      the BEST WAY would have been to SHARE the code but like I said I am NOT allowed to do so, otherwise I would have done it a LONG time ago.

      1- "I am guessing odata is returning node->children->children (so i am not sure what data is not fetching -" these CHILDREN have their OWN CHILDREN they will be FETCHED in ANOTHER call")" = > I debugged the OData service, which was implemented by my Colleague and INDEED using my INITIAL scenario, when you EXPAND a Node that has CHILDREN, an OData call is performed and the Service is CALLED. The Data are NOT fetched ALL in ONE CALL.

      2- "any how it's to difecult to help you without full code and all overview. I tried my best ...:)" => INDEED you have done A WHOLE LOT and it was NOT in VAIN because I was able to LEARN NEW THINGS with ALL your SUGGESTIONS, THANKS AGAIN 😊 😊 😊.

      3- "Hope you fix you issue soon." => THANKS, I do appreciate, I intend to find the solution, I will do my BEST. I wish you a very NICE day. Take care and stay BLESSED 😊

      Best Regards


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.