Skip to Content
0
Former Member
Jan 05, 2008 at 10:06 AM

Change of Tab in Tabstrip through Button

24 Views

hi,

I want to change tabs through Buttons. I have given two buttons like Next & Previous. I have given contextAttribute "SelectedTab" and bind with selectedTab property of tabstrip. i have done this coding

public void onActionPrevious(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionPrevious(ServerEvent)

if(wdContext.currentContextElement().getSelectedTab()=="FamilyTab")

{

wdContext.currentContextElement().setSelectedTab("PersonalTab");

}

else if (wdContext.currentContextElement().getSelectedTab()=="AddressTab")

{

wdContext.currentContextElement().setSelectedTab("FamilyTab");

}

It is working fine. But this type of code is not good programming skills becoz there are so many tabs here.

Please give me some other coding so that code will be less and programming skills are good.

Regards

Manish