[richfaces-issues] [JBoss JIRA] (RF-12068) rich:toggleControl: can't use immediate=true

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Tue Mar 20 10:16:47 EDT 2012


Lukáš Fryč created RF-12068:
-------------------------------

             Summary: 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č


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=togglePanel&sample=wizard&skin=blueSky
[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: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list