cancel
Showing results for 
Search instead for 
Did you mean: 

Question about Routing

Former Member
0 Kudos
106

Hello experts,

in my Application i use an Component Container from which i can start different applications. For this i have a main Application (like Fiori Launchpad) which uses Routing to start the different Applications. This works fine! The Url is for example (host/#/applicationA)

But now my Problem begins:

In this Application is another Router. But this routes are not triggered, if i call an route the Router from the host-application is triggered.

Is there any way to implement that the Router from the Application gets triggered? To achieve something like this: "host/#/applicationA/#/product(123)"

Thanks for your Help!

Sascha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

No one has an Idea? Isn't this possible with SAPUI5?

This is the Coding example how I do my Routing today:

In my Main Application:

Routing in Component:


routing     : {

            config: {

                routerClass      : portal.Router,

                viewType         : "XML",

                viewPath       : "portal.view",

                targetAggregation: "content",

                targetControl   : "Mobile--myShell",

                clearTarget      : false

            },

            routes: [

                {

                    pattern           : ["", "main"],

                    name              : "navMain",

                    view              : "Main"

                },

                {

      pattern    : "timesheet",

  name              : "navTimesheet",

      view              : "Timesheet",

}]


This works fine. I am able to navigate via Hash and open the corresponding Application in my Shell. I open the corresponding Application like this:


onInit: function() {

  sap.ui.core.UIComponent.getRouterFor(this).attachRoutePatternMatched(this.onRouteMatched, this);

  },

  onRouteMatched : function(evt){

  if(evt.getParameter("name") === "navTimesheet"){

  if(!this._oComponent){

  this._oComponent = new sap.ui.core.ComponentContainer({

  id     : "time",

  name   : "TimeSheet",

  height : "100%",

  url    : "/mibs/TimeSheet"

  });

  }

  sap.ui.getCore().byId("Mobile").byId("myShell").removeAllContent();

  sap.ui.getCore().byId("Mobile").byId("myShell").addContent(this._oComponent);

  }

  },

In this new Application i have another Component.js/Router.js with Routes. How do I achieve that this routes are concatenated to the existing string?

Is there no way?

Thanks for your Help!

Sascha