cancel
Showing results for 
Search instead for 
Did you mean: 

Browser History issue

Former Member
0 Kudos

Hi Experts ,

i have a scenario to discuss here.
   Scenario: 

      -inputs         

                Application type -FIORI & Placed at FIORI Launchpad  

                Chart used -Comparison chart with Tile  

                Data source- JSON Model 

                Views-XML View  

                Controller-JavaScript controller



we have created 2 application in similar manner but different data. applications are working fine individually.



Problem:



  Once Application1 run and displayed correctly then user goes back to home screen, i.e main launchpad   and click the second application(Application2), application runs but on the comparison chart keeps the 1st applications(Application1) data.



Assumption:



  Browser history causing the problem.


Pasting images - Application 1 , Application 2 - problem image




Solution expected:
    looking for a working code to clear the content of first comparison chart while running the 2nd application in the browser history.


Thanks In advance,


Sandeep



Accepted Solutions (0)

Answers (1)

Answers (1)

kedarT
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Kedar,

Thanks for your reply.

Actually I am not looking for a method to clear cache, i am looking for working code to reset data on the comparison chart while loading Application2.

Can you please provide some information on that.

Thanks,

Sandeep

RameshShrestha
Contributor
0 Kudos

Hi Sandeep,

You are using the JSON model, so model is already available locally.

Also I assume both model have same name , so it might be taking same value.

Some possible actions that I would consider :

1.Destroy the content of view on onExit method of both apps.

2. Giving two different model name

3. Check the console if there is some error that might have created the problem while rendering second application.

4. Check if you are setting the model in the global level  ie into sap.ui.core (this should not be done while integrating into launchpad

Former Member
0 Kudos

Hi Ramesh,

We are using JSON Model and we have set different names for the models.

And we are setting model using below code ,

this.getView().setModel(ModelApp1, "ModelApp1");

Can you please  share some code  on, how to destroy the content of view on onExit method ?

Thanks,

Sandeep

RameshShrestha
Contributor
0 Kudos

Hi Sandeep,

below code will destroyContent.

onExit : function(){

this.getView().destroyContent();

}

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.core.mvc.View

Former Member
0 Kudos

Thanks for your reply Ramesh. I will try this 🙂