avatar image
Former Member

Error: Cannot read property '_display' of undefined

Hi,

I am getting the below error "Uncaught TypeError: Cannot read property '_display' of undefined" when I try to executes the SAPUI5 application through routing. Please find the screen shot of the error:

When I debug the application I get the error at line:

Could you please help me resolve the issue. Please find the Component.js code below:

capture.jpg (33.9 kB)
capture.jpg (45.9 kB)
capture.jpg (36.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 19, 2017 at 03:10 PM

    check if it helps

    oRouter.getTargets().display

    Add comment
    10|10000 characters needed characters exceeded

  • May 23, 2017 at 07:23 AM

    In the Routes, you have mentioned the route name as "Master.view.js".. you just need to mention "Master" and and you need to add a new property "viewType" : "JS".

    Best Regards,
    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Mahesh kumar palavalli

      Hi Mahesh,

      Here is my routing section:

      metadata: {

      "rootView": "sapui5.demo.mvcapp.MVC1.webapp.view.App",

      "config": { "serviceUrl": "service/data.json" },

      "routing": {

      "config": {

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

      "viewType": "XML",

      "viewPath": "sapui5.demo.mvcapp.MVC1.webapp.view",

      "controlId": "app",

      "controlAggregation": "pages", "transition": "slide" },

      "route": [{ "pattern": "", "name": "master", "target": "master", "greedy": false }],

      "target": {

      "master": {

      "viewName": "Master",

      "viewPath": "sapui5.demo.mvcapp.MVC1.webapp.view",

      "viewType": "XML",

      "viewLevel": 1,

      "transition": "slide",

      "clearAggregation": "true"

      }

      }

      }

      },

Skip to Content