Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3074

Extending Component Routes to Change Root View

$
0
0

Hi experts.

 

I have created and application from which 4 apps extended. I had no problems with the extension except for one.

 

I have two views: a list and an object page.

 

those are my routes

 

routing: {

  config: {

  routerClass: "sap.m.routing.Router",

  viewType: "XML",

  viewPath: "namespace.view",

  controlId: "App",

  clearTarget: false,

  controlAggregation: "pages",

  bypassed: {

  target: ["List"]

  }

  },

  routes: [{

  pattern: "List/:context:",

  name: "List",

  target: ["List"]

  }, {

  pattern: "ObjectPage({pernr})",

  name: "ObjectPage",

  target: ["ObjectPage"]

  }, {

  pattern: "",

  name: "default",

  target: ["List"]

  }],

  targets: {

  "List": {

  viewName: "List",

  viewId: "List",

  viewLevel: "1"

  },

  "ObjectPage": {

  viewName: "ObjectPage",

  viewId: "ObjectPage",

  viewLevel: "1"

  }

  }

  }

 

In this particular application I want to show the object page rigth away. Changing the "root"(List)  to the ObjectPage.
Someone knows how to do that extending the component or in other way ?

 

Thanks


Viewing all articles
Browse latest Browse all 3074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>