on 05-26-2017 4:17 PM
Dear Experts,
I am stuck in a SAP UI5 application that is throwing an error "Cannot set property '_oTargetHandler' of undefined". I am learning routing in SAPUI5.
Files Layout:
Please find the attached code.
Thanks in Advance.
Regards,
Rachit.
Hi Steve,
Can you please help me here. I am stuck in this issue.
Thanks.
Regards,
Rachit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code you have written is based on old architecture, I would strongly recommend you to use the latest manifest file to store the routing information and use the component to load the manifest and instantiate the routing.
Moreover I've observed that you are calling "
,which is deprecated .
As i can see that you are already using the WebIDE, try to create a master detail application using the master detail template, which will generate 99% of the code to run your application with proper routing configuraiton, later on you can tweak your code.
Best Regards,
Mahesh
Hi Rachit
Try as follow.
in the code , the viewPath is not need because you have already written in the config section which is the default value for your targets.
And if you want to write it, you should not include the viewName in viewPath.
"target": {
"master": {
"viewName": "Master",
"viewPath": "sapui5.demo.mvcapp.MVC1.webapp.view.Master",
"viewType": "XML",
"viewLevel": 1,
"transition": "slide",
"clearAggregation": "true"
}
}
Another thing is your controller code.
The controller code should write in controller of the Master view, not view App's controller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.