Skip to Content
0
Former Member
Jun 02, 2016 at 06:47 AM

Issue in Routing Dynamically

148 Views

Hello

I am navigating from one view to another view.

Issue Explanation:

Sapui5 Application is embedded in Fiori launchpad.

First view is called from Fiori Launchpad tile.

On Button click ,another view is call.

On Navigating back, First View is navigated and on again navigating back Fiori Launchpad screen is shown.


Clicking on same tile, application navigates to First view properly.

But clicking on button to call second view gives error.

The object with ID __jsViewId was destroyed and cannot be used anymore.


Code to navigate


var oRouter = sap.ui.core.routing.Router.getRouter("router");
  oRouter.addRoute({
  name : "view2",
  pattern : ["view2"],
  view : "view2",
  viewPath : additionalComponentParam+"pwd1_mai.Detail",
  viewType : "JS",
  targetControl : "splitapp",
  targetAggregation : "detailPages",
  clearTarget:false,
  });
  try{
  oRouter.navTo("view2");
  }catch(e){
  console.log(e.stack);
  }

Help is appreciated.


Thanks and Regards

Roshan Jalgaonkar