Skip to Content

Error : Control with ID App could not be found - EventProvider sap.m.routing.Target

Hello Experts,

I am facing issue in Routing.

My Menifest.js is like below:

"routing" : {

"config" : {

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

"viewType": "XML",

"viewPath": "NewProj.view",

"controlId": "App",

"targetControl" : "App",

"controlAggregation": "pages",

"transition": "slide"

},

"routes" :[

{

"pattern": "",

"name": "Home",

"target": "Home"

}

],

"targets" :{

"Home" : {

"viewName" : "Home",

"viewLevel" : 0

}

}

}

And rootview is defined as

"rootView": {

"viewName": "NewProj.view.Home",

"type": "XML"

},

I have App.view.xml view:

<mvc:View

controllerName="NewProj.controller.App"

xmlns:html="http://www.w3.org/1999/xhtml"

xmlns:mvc="sap.ui.core.mvc"

xmlns="sap.m">

<App id = "App">

</App>

</mvc:View>

On run I am getting below errors:

Control with ID App could not be found - EventProvider sap.m.routing.Target

UIComponent.js:6 Uncaught TypeError: Cannot read property 'oTargetControl' of undefined

Thanks,

Abhishek

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Jun 28, 2016 at 04:28 PM

    Set your rootview view name to

    "viewName": "NewProj.view.App",


    Regards

    Jamie

    SAP - Technology RIG

    Add comment
    10|10000 characters needed characters exceeded