PrimeFaces Selectors - @(selector)

PFS (PrimeFaces Selectors) integrates jQuery Selector API with JSF's component model. Full power of Selector API can be used with or without the regular component referencing.

New User

Source

    <h:form id="form">

        <p:panel id="panel" header="New User" style="margin-bottom:10px;">
            <p:messages id="messages" />

            <h:panelGrid columns="4">
                <h:outputLabel for="firstname" value="Firstname: *" />
                <p:inputText id="firstname" value="#{pprBean.firstname}" required="true" label="Firstname">
                    <f:validateLength minimum="2" />
                </p:inputText>
                <p:message for="firstname" />
                <h:outputText value="#{pprBean.firstname}" />

                <h:outputLabel for="surname" value="Surname: *" />
                <p:inputText id="surname" value="#{pprBean.surname}" required="true" label="Surname"/>
                <p:message for="surname" />
                <h:outputText value="#{pprBean.surname}" />

                <h:outputLabel for="city" value="City: *" />
                <h:selectOneMenu id="city" value="#{pprBean.city}" required="true">
                    <f:selectItem itemLabel="Select One" itemValue="" />
                    <f:selectItems value="#{pprBean.cities}" />
                </h:selectOneMenu>
                <p:message for="city" />
                <h:outputText value="#{pprBean.city}" />

            </h:panelGrid>
        </p:panel>

        <h:panelGrid columns="5">
            <p:commandButton update="@(form)" value="All Forms" />

            <p:commandButton update="@(form:last)" value="Last Form" />

            <p:commandButton update="@(.ui-panel)" value="All Panels" />

            <p:commandButton process="@(.ui-panel :input)" update="@(.ui-panel)" value="Inputs of Panel" />

            <p:commandButton process="@(.ui-panel :input:not(select))" update="@(.ui-panel)" value="Inputs Except Select" />
        </h:panelGrid>

    </h:form>