Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8735

Only Page Title displayed when add content dynamically to the shell in SAPUI5

$
0
0

Hi,

 

I want to display charts one by one in one page without clicking any button.

 

For that I used Navigation bar to display headings of that charts.

 

In that I used setInterval function to navigate to another item without clicking on that .Then  I am getting id of that selected Item and navigate to already existing views based on that selected Item using below code in onInit function.

 

onInit: function(oevent) {

   var oShell = sap.ui.getCore().byId("myShell");

    var length = oShell.mAggregations.worksetItems.length;

    var i = 0;

     var id = setInterval(function() {

      if(i >= length)

      {

      i=0;

      }

      oShell.setSelectedWorksetItem('__item'+i);

      var selectedId = oShell.getSelectedWorksetItem();

 

       var view = new sap.ui.view({

              viewName : "chart_nav_bar.chart"+i,

               type : "JS"

         });

 

              oShell.setContent(view);

 

               i++;

  }, 3000);

 

  },

My project Structure is like below.

Proj_Structure.jpg

But the Problem is I am not getting any content . I am getting only title of that particular views like below.

chart.jpg

In that image I am navigating to chart0.js file. In that  I am having simple button with title chart0. But I am getting only Title without button.

 

I followed below URL to add the view as content to the Shell dynamically.

 

http://scn.sap.com/community/developer-center/front-end/blog/2012/10/15/consume-netweaver-gateway-services-via-sapui5

 

I already applied   this.setHeight("100%"); .Still I am facing same issue.

 

 

Please help me to solve this Issue.

 

Thanks&Regards

Sridevi


Viewing all articles
Browse latest Browse all 8735

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>