JARCH SHOWCASE
JARCH SHOWCASE
Wizard Wizard creates a workflow by creating multiple steps out of a single page form. Only current step is processed partially and next step is displayed if current step passes validations. Wizard flow is sequential by default and this can be managed using the optional ajax flowListeners, simply outcome of a flowListener defines the next step to display.
  • Personal
  • Address
  • Contact
  • Confirmation
Personal Details
Firstname: *
Lastname: *
Age:
Skip to last:
<a:form>
                
    <a:growl id="growl" sticky="true" showDetail="true"/>

    <a:wizard flowListener="#{userWizard.onFlowProcess}">
        <a:tab id="personal" title="Personal">
            <a:panel header="Personal Details">
                <a:messages />
                <h:panelGrid columns="2" columnClasses="label, value">
                    <h:outputText value="Firstname: *" />
                    <a:inputText value="#{userWizard.user.firstname}" required="true" label="Firstname"/>

                    <h:outputText value="Lastname: *" />
                    <a:inputText value="#{userWizard.user.lastname}" required="true" label="Lastname"/>

                    <h:outputText value="Age: " />
                    <a:inputText value="#{userWizard.user.age}" />

                    <h:outputText value="Skip to last: " />
                    <h:selectBooleanCheckbox value="#{userWizard.skip}" />
                </h:panelGrid>
            </a:panel>
        </a:tab>

        <a:tab id="address" title="Address">
            <a:panel header="Address Details">
                <a:messages />
                <h:panelGrid columns="2" columnClasses="label, value">
                    <h:outputText value="Street: " />
                    <a:inputText value="#{userWizard.user.street}" />

                    <h:outputText value="Postal Code: " />
                    <a:inputText value="#{userWizard.user.postalCode}" />

                    <h:outputText value="City: " />
                    <a:inputText value="#{userWizard.user.city}" />

                    <h:outputText value="Skip to last: " />
                    <h:selectBooleanCheckbox value="#{userWizard.skip}" />
                </h:panelGrid>
            </a:panel>
        </a:tab>

        <a:tab id="contact" title="Contact">
            <a:panel header="Contact Information">
                <a:messages />
                <h:panelGrid columns="2" columnClasses="label, value">
                    <h:outputText value="Email: *" />
                    <a:inputText value="#{userWizard.user.email}" required="true" label="Email"/>

                    <h:outputText value="Phone: " />
                    <a:inputText value="#{userWizard.user.phone}"/>

                    <h:outputText value="Additional Info: " />
                    <a:inputText value="#{userWizard.user.info}"/>
                </h:panelGrid>
            </a:panel>
        </a:tab>

        <a:tab id="confirm" title="Confirmation">
            <a:panel header="Confirmation">
                <h:panelGrid id="confirmation" columns="3" columnClasses="grid,grid,grid">
                    <h:panelGrid columns="2" columnClasses="label, value">
                        <h:outputText value="Firstname: " />
                        <h:outputText value="#{userWizard.user.firstname}" styleClass="outputLabel"/>

                        <h:outputText value="Lastname: " />
                        <h:outputText value="#{userWizard.user.lastname}" styleClass="outputLabel"/>

                        <h:outputText value="Age: " />
                        <h:outputText value="#{userWizard.user.age}" styleClass="outputLabel"/>
                    </h:panelGrid>

                    <h:panelGrid columns="2" columnClasses="label, value">
                        <h:outputText value="Street: " />
                        <h:outputText value="#{userWizard.user.street}" styleClass="outputLabel"/>

                        <h:outputText value="Postal: " />
                        <h:outputText value="#{userWizard.user.postalCode}" styleClass="outputLabel"/>

                        <h:outputText value="City: " />
                        <h:outputText value="#{userWizard.user.city}" styleClass="outputLabel"/>
                    </h:panelGrid>

                    <h:panelGrid columns="2" columnClasses="label, value">
                        <h:outputText value="Email: " />
                        <h:outputText value="#{userWizard.user.email}" styleClass="outputLabel"/>

                        <h:outputText value="Phone " />
                        <h:outputText value="#{userWizard.user.phone}" styleClass="outputLabel"/>

                        <h:outputText value="Info: " />
                        <h:outputText value="#{userWizard.user.info}" styleClass="outputLabel"/>

                        <h:outputText />
                        <h:outputText />
                    </h:panelGrid>
                </h:panelGrid>

                <a:commandButton value="Submit" actionListener="#{userWizard.save}" update="growl" process="@this"/>
            </a:panel>
        </a:tab>
    </a:wizard>

</a:form>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.