cancel
Showing results for 
Search instead for 
Did you mean: 

ActionHandling in a TabStrip

Former Member
0 Kudos

Hello,

I've got a TabStrip in my Application. How can i modify the views between the tabs. I think it is an action like "onSelect" but if i try this code i get an ClassCastException message:


IWDTabStrip tab4 = (IWDTabStrip)view.getElement("Tab2");
tab4.setOnSelect(wdThis.wdGetOpenUserListAction());

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

okay,

but i think you dont understand my problem.

i've got a tabstrip with 3 tabs (userlist, inventarlist and inventarattributlist).

when i click on userlist, i have an action how i get userdetails.

but how can i handle, if i click on inventarlist tha i get an inventarlist.

i should be a different view and a different action.

Former Member
0 Kudos

If you want to place different views inside tabs, add a ViewContainerUIElement inside each tab and assign the views to the containers (node "Windows" in Web Dynpro Explorer).

In the action handler of the TabStrip.onSelect event, navigate to the view corresponding to the selected tab. In the inbound plug of that view, you can execute the method that retrieves the data for this view.

Armin

Answers (7)

Answers (7)

Former Member
0 Kudos

thanks,

that solved my problem!

Former Member
0 Kudos

in my "public static void wdDoModifyView"

i have this code:

		
IWDTabStrip tab = XXX;
wdContext.currentContextElement().setSelectedTab(tab.getSelectedTab());

but however i edit XXX i get an error message

Former Member
0 Kudos

You don't need to write that inside wdDoModifyView(). Simply initialize attribute "SelectedTab" with the ID of the Tab instance you want to select initially.

Armin

Former Member
0 Kudos

thanks armin,

i tried this but how can i initalize the IWDTabStrip?

Former Member
0 Kudos

What do you mean with "initialize"?

You can set the initially selected tab by setting the context attribute value (to which TabStrip.selectedTab is bound), e.g. in method wdDoInit().

Or what was the question?

Armin

Former Member
0 Kudos

thanks for your help but i can not find any solution for my problem in this document

Former Member
0 Kudos

HI

GOOD

GO THROUGH THIS LINK I HOPE DEFINITELY YOU WILL GET SOME IDEA TO SOLVE YOUR PROBLEM

http://support.businessobjects.com/library/docfiles/cps10/downloads/en/boxi_sap_infoview_en.pdf

THANKS

MRUTYUN

Former Member
0 Kudos

Interesting document. Unfortunately totally off-topic.

Armin

Former Member
0 Kudos

okay,

it is a tab. but how can i handle different actions for the different tabs and views?

Former Member
0 Kudos

The easy way to determine the currently selected tab in the action handler is: Bind the TabStrip.selectedTab property to a context attribute of type "string". Then you can get the current tab ID from this attribute.

Armin

Former Member
0 Kudos

Sebastian,

Check ID you are using in view.getElement("Tab2").

Seems that <b>Tab2</b> is not a <i>TabStrip</i> but a <i>Tab</i> within TabStrip.

VS