Skip to Content
avatar image
Former Member

how to set view Id ???

Hello everyone,

I am working on a project in which I am using component.js and routing for navigating between views my project consist of no of views which I have defined in one view App.view.js below is the code of app.view.js

createContent: function (oController) {

  // to avoid scroll bars on desktop the root view must be set to block display

  // create app = new sap.m.App("App");

  var launchpad = sap.ui.xmlview("launchpad", "sap.ui.KOL.view.launchpad");
  launchpad.getController().nav = this.getController();;
  var allKOL = sap.ui.xmlview("allKOL", "sap.ui.KOL.view.allKOL");
  allKOL.getController().nav = this.getController();;

as you can see I have given ids to the view launchpad and all kol but when I am running the application the ids are getting initialized automatically as __xmlview00 and is not taking as what I have assigned in the app.view.js .

So can anyone please help me with assigning the ids to the view.

Thanks in advance

Anshul Dharmadhikari

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 12, 2015 at 10:08 AM

    As far as I know, you can't set ID to xml view.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I think you set the view id's correctly but you might have missed


      If already above syntax exist , use below and play .,false);,true);

      I am able to use similar to your approach already. If still it won't work , you should check app.controller code which may be creating trouble .


      Koti Reddy

  • Jan 20, 2015 at 09:02 AM


      That is the standard behavior of creating unique Ids. It is clearly stated even in the sdk help that when ever you set and ID it is either prefixed with view Id

    SAPUI5 SDK - Demo Kit

    SAPUI5 SDK - Demo Kit

    may be you can try using createId() method.



    Add comment
    10|10000 characters needed characters exceeded