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.
But the Problem is I am not getting any content . I am getting only title of that particular views like below.
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.
I already applied this.setHeight("100%"); .Still I am facing same issue.
Please help me to solve this Issue.
Thanks&Regards
Sridevi