| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/07/2006 00:00:00
|
jameskhoo
Joined: 30/06/2006 00:00:00
Messages: 39
Offline
|
Hi all
It's me again...so sorry to trouble you guys..
Assuming I have one ice:form with many panelTabSets, and I would like to detect panelTabChange events for two particular PanelTabSet only, say panelTabSet A, and B, is that possible?
Looking at the component-showcase example , I can't see a way on "binding" a TabChangeListner to each individual PanelTabSet in my JSP page..any one like to elighthen me?
A example will be appreciated, thanks
Cheers
James Khoo
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/07/2006 00:00:00
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2701
Offline
|
Hi James,
Don't worry, the more questions the better:) Yes, you just have to implement a TabChangeListener like so...
public class PanelTabSetAListener implements TabChangeListener{
private PanelTabSet tabSet;
private int currentTabIndex;
public PanelTabSet getTabSet(){ return tabSet; }
public void setTabSet(PanelTabSet tabs){ tabSet = tabs; }
public void processTabChange(TabChangeEvent tabChangeEvent){
this.currentTabIndex = tabChangeEvent.getNewTabIndex();
}
}
then, you can bind your tab listener like so...assuming you've set up PanelTabAListener as a managed bean with the name "panelTabSetA"...
<ice:panelTabSet binding="#{panelTabSetA}"...
<ice:panelTab id="tab1" label="Tab 1">
<ice:panelGroup ...
</ice:panelTab>
</ice:panelTabSet>
Hope that helps.
Thanks,
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 08/06/2007 03:25:30
|
dinobhai
Joined: 29/11/2006 00:00:00
Messages: 117
Offline
|
Thanks got it working
|
|
|
 |
|
|