Skip to Content
1
Nov 19, 2013 at 09:31 AM

How to get the default view in IconTabBar in Jsview?

986 Views

Hi,

In my application I am using IconTabBar. In that when click on Tabs I am getting the view,But by default I am not getting any view.

When run my application my output is like below.

I am getting output like below when click on first tab.But I want it by default when I run that application without clicking on the tab.

I am using Jsview and mycode is like below.

var iconTabBar = new sap.m.IconTabBar({

expanded : "{device>/isNoPhone}",

select : function(oEvent){

oController.handleTabSelect(oEvent);

},

items : [ new sap.m.IconTabFilter({

key : "Info",

icon : "sap-icon://hint"

}),new sap.m.IconTabFilter({

key : "Notes",

icon : "sap-icon://notes"

}),new sap.m.IconTabFilter({

key : "Attachments",

icon : "sap-icon://attachment"

})]

});

In XML view we can navigate from one view to another view with out click on tab like below.

<IconTabBar

expanded="{device>/isNoPhone}"

select="handleTabSelect" >

<items>

<IconTabFilter

key="Info"

icon="sap-icon://hint">

<mvc:XMLView viewName="view.DetailInfo"></mvc:XMLView>

</IconTabFilter>

<IconTabFilter

key="Notes"

icon="sap-icon://notes">

<!-- content is lazy loaded -->

</IconTabFilter>

<IconTabFilter

key="Attachments"

icon="sap-icon://attachment">

<!-- content is lazy loaded -->

</IconTabFilter>

</items>

</IconTabBar>

How can we do the same thing when we are using jsview in above code to get the first tab view by default?

Please do help me to solve this.

Thanks&Regards

Sridevi

Attachments

tabbar.jpg (79.3 kB)
tabbar1.jpg (61.9 kB)