Skip to Content
author's profile photo Former Member
Former Member

Change of Tab in Tabstrip through Button

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 10:33 AM

    Hi,

    Are you using different views for each tab??

    thanks & regards,

    Manoj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 02:38 PM

    I would not compare strings using "==" but using "equals" and also not use a tab strip for implementing a wizard-like UI.

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Honestly, I don't understand your problem.

      To implement such a wizard-like UI using a tab strip (which I don't consider a good idea, but that's another issue), you just need to keep the tab IDs in a list and implement two actions that set the context attribute value (to which the tab strip's "selectedTab" property is bound) to the next or previous ID in that list.

      What has this to with different DCs etc.?

      Armin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.