first at all, I´m aware that there were similiar asked questions, but none of the answers could solve my problem.
Short look into my code:
My Component.js looks like this
routes: [
{
pattern: "", //home page
name: util.Constants.Tile,
view: util.Constants.Tile,
viewId: util.Constants.Tile,
targetAggregation: "pages"
//targetControl: "idAppControl"
},
{
pattern: "firstExample",
name: util.Constants.FirstExample,
view: util.Constants.FirstExample,
viewId: util.Constants.FirstExample,
targetAggregation: "pages",
targetControl : "idAppControl",
subroutes : [
{
pattern: "firstExample",
name: util.Constants.ExampleMaster,
view: util.Constants.ExampleMaster,
targetAggregation: "masterPages",
targetControl: "idSplitContainerControl",
},
{
pattern: "firstExample/:typeMaster:",
name: util.Constants.ExampleSecondMaster,
view: util.Constants.ExampleSecondMaster,
targetAggregation: "masterPages",
targetControl: "idSplitContainerControl",
subroutes : [
{
pattern : "firstExample/:typeDetail:",
name : util.Constants.ExampleDetail,
view : util.Constants.ExampleDetail,
targetAggregation : "detailPages"
}
]
}
]
},
Short explanation: It´s a page with a normal app view (no master view) and a following SplitContainer with two master and one detail view. Whenever I want to call the detail view
onSelect : function (e) {
var routeTo = e.getSource().getTitle();
this.router.navTo(util.Constants.ExampleDetail, { typeDetail : routeTo } );
},
it says
2015-03-30 14:50:06 Control with ID idAppControl could not be found - sap-ui-core-dbg.js:15213
Any idea? Thanks for your help in advance!
Links to the similiar topics:
it's difficult to debug the routing code of someone else, so here is my working router for a multi page application. The first one is a simple page with tiles and the second one is a Master/Detail view.
Note that the targetControl is set for both routes. masterView is part of the MasterApp that is loaded first.
idAppControl is part of the App.view.xml with
<SplitApp id="idAppControl" />
. I based my application on the example in the developer guidelines just like you.Component.js has this:
App.view:
Config:
When looking at your router, I would say you have problems with the order of the pages. And as general advise, I would like to say that navTo takes the parameter "name" of the routes, not view or pattern. Took me some time to learn that.
Kind regards,
Michael