Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Fail to load view

Hi ,

Just now i started UI5 Developments ,

i was doing shell, in the shell i created two work set  items whenever i selected workset items its has call view but its giving error.

var oshell = new sap.ui.ux3.Shell({

  

    appTitle: "NAPESCO",

  

    showSearchTool: false,

    content : [ new sap.ui.view (

  

    {

    id: "VIEW1", viewName : "expenserpt.exp_rpt",

    type : sap.ui.core.mvc.ViewType.JS

  

    }

  

    )],      

    worksetItems: [

                 

                  new sap.ui.ux3.NavigationItem("FI",{

                 

                  key: "FI",

                  text: "Finace",

                  subItems:[

                            new sap.ui.ux3.NavigationItem("EXP",{Key:"EXP",text:"Expense Report"})

                           

                           

                            ]

                  }),             

                 

                 

new sap.ui.ux3.NavigationItem("OFS",{

                 

                  key: "OFS",

                  text: "OFS(Oil Field Service)",

                  subItems:[new sap.ui.ux3.NavigationItem("OFS_1",{Key:"RIG",text:"RIG"}),

                            new sap.ui.ux3.NavigationItem("OFS_2",{Key:"RIG",text:"Well Program"})

                           

                            

                  ]

                 

                  })

                 

                 

                 

                  ],

 

                

   

   

    worksetItemSelected:function(oEvent)

    {

  

      var sID = oEvent.getParameter("key");

     

     

     

      switch(sID)

    {

     

    case"EXP":

         

    var view = oshell.sap.ui.ux3.getCore.byId(sID); 

    

      view = sap.ui.view({

     

      id: 'VIEW1', viewName:"expenserpt.exp_rpt", type:sap.ui.core.mvc.ViewType.JS});        

          this.addContent(view);      

           

     

    }

     

     

    },

                 

   

  

    });

  

  oshell.placeAt('container');

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question