-
1. Re: togglePanel server-side events?
dwagmuse May 27, 2011 7:25 PM (in response to dwagmuse)1 of 1 people found this helpfulI finally did find an example of how to use itemChangeListener in the showcase examples under menuPanel.
Basically, togglePanel supports the itemChangeListener tag which works like actionListener except that it requires a different java method signature.
in the view:
<rich:togglePanel itemChangeListener="#{bean.next}" >
<rich:togglePanelItem id="first" >
....
<h:commandButton value="Next..." >
<rich:toggleControl targetItem="@next" event="click" />
</h:commandButton>
</rich:togglePanelItem>
in the bean:
public void next(ItemChangeEvent e) {
if ("first".equals(e.getOldItemName()) {
// do whatever servicing needs to happen after the first step of the wizard
}
}
The last step of the wizard has to have a commandButton with a real action to go somwhere else INSTEAD OF a toggleControl.