cancel
Showing results for 
Search instead for 
Did you mean: 

No available events to handle onclick of a tab?

Former Member
0 Kudos

Maybe I'm missing something here, but we have implemented a tabstrip view with multiple tabs. But we can't seem to find an event that allows us to code some custom logic that is fired whenever a particular tab is clicked.

Right now, there is some code that is invoked in the custom controller whenever the entire tab strip view is displayed, but functionally, when a user clicks on a particular tab, I actually want some other logic to invoke to see if other tabs have got certain data. I cannot seem to find a place to put this code that executes when a particular tab is clicked.

Help!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If you want to execute some code that has to be in a non static method

1. Do a source mapping for the action that is attached to the onselect event of the tab strip in the wdmodify method

2. In the action handler check the tab that got clicked and execute the code to run for the specific tab.

Thanks and Regards,

Sam Mathew

Former Member
0 Kudos

Hi Yew

You can attach an action to the onSelect event in the TabStrip. On every selection of a tab this will be fired and in the modify view you can use the following code to find out which tab is selected


IWDTabStrip iwdTabStrip = (IWDTabStrip) view.getElement("<id of the TabStrip>");
String selectedTab = iwdTabStrip.getSelectedTab();

The string 'selectedTab' will be the id of the tab that you have selected.

Regards

Pran