I have a togglepanel and a a4j commandButton, I would like to submit the form and next page on complete.
But It is not working, it won’t next page but submit only. Here is the code.
<a4j:commandButton action="#{inputData.inputId}" value="Next">
<f:param name="id" value="#{userBean.id}" />
<rich:toggleControl targetItem="@next" event="complete"/>
</a4j:commandButton>
I tried oncomplete=”#{rich:component(‘tooglepanelid’)}.next();” too, not working too.. where can i find the togglepanel api doc ?
You can find the API here: http://docs.jboss.org/richfaces/latest_4_X/vdldoc/
togglepanel: http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/togglePanel.html
Although be warned it is still work in progress.
If you change the event to a click does it work? I don’t think complete is a valid value as oncomplete is not a valid JS event for the ‘parent’ component. But not sure…
Also try putting in a messages tag to see if there are any errors.
As for this:
I don’t think next() is valid JS function for that toggle panel, based on the RF component reference documentation these functions look to be the ones you need to use: