]
Brian Leathem updated RF-12068:
-------------------------------
Fix Version/s: 4.3-Tracking
rich:toggleControl: can't use immediate=true
--------------------------------------------
Key: RF-12068
URL:
https://issues.jboss.org/browse/RF-12068
Project: RichFaces
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: component-panels-layout-themes
Affects Versions: 4.2.0.Final
Reporter: Lukáš Fryč
Fix For: 4.3-Tracking
The wizard can be created with {{togglePanel}} and {{toggleControl}}.
It can use validation mechanism and Ajax to switch between wizard windows.
----
But when validation fails, you can't use {{toggleControl}} to switch to another
panel
like in the sample of Back button - there is no possibility to request {{immediate}}
response (shortened lifecycle skipping validation phase).
----
The scenario can be seen in the sample of Showcase - togglePanel - Wizard [1],
and in the QuickStart {{richfaces-validation}} [2].
[1]
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=toggleP...
[2]
https://github.com/lfryc/quickstart/tree/quickstart-28
----
Sample code:
{code}
<rich:togglePanelItem>
<!-- Step 2: name and phone number -->
<h:panelGrid columns="3">
<h:outputLabel for="name" value="Name" />
<h:inputText id="name" value="#{newMember.name}">
<!-- rich:validator needs to be used to trigger client-side validation
after blur event -->
<rich:validator event="blur" />
</h:inputText>
<rich:message for="name" />
<h:outputLabel for="phone" value="Phone #" />
<h:inputText id="phone"
value="#{newMember.phoneNumber}">
<!-- rich:validator needs to be used to trigger client-side validation
after blur event -->
<rich:validator event="blur" />
</h:inputText>
<rich:message for="phone" />
</h:panelGrid>
<h:commandButton value="Back">
<rich:toggleControl event="click" targetItem="@prev"
/>
</h:commandButton>
<h:commandButton value="Continue">
<rich:toggleControl event="click" targetItem="@next"
/>
</h:commandButton>
</rich:togglePanelItem>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: