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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.