Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.

Ajax Framework Observer / Event

AutoUpdate allows you to use the observer pattern in which a component maintains a list of its dependents, called observers, and notifies them automatically of any state changes. Instead of having to list every component you want to update on a CommandButton you can subscribe components to listen to that button's event using @obs(event).

Global: Event1: Event2:

<div class="card">
    <h:form>
        <h:outputLabel for="name" value="Name" styleClass="p-mr-2" />
        <p:inputText id="name" value="#{observerView.text}">
            <p:ajax process="@this" update="@none" ignoreAutoUpdate="true"/>
        </p:inputText>

        <div class="p-my-3">
            <p:commandButton value="Update global" icon="pi pi-check" styleClass="p-mr-2" />
            <p:commandButton value="Update event1" update="@obs(event1)" icon="pi pi-check" styleClass="p-mr-2"/>
            <p:commandButton value="Update event2" update="@obs(event2)" icon="pi pi-check"/>
        </div>

        <h:outputText id="displayGlobal" value="Global: #{observerView.text}" styleClass="p-d-block p-mb-3">
            <p:autoUpdate/>
        </h:outputText>

        <h:outputText id="displayEvent1" value="Event1: #{observerView.text}" styleClass="p-d-block p-mb-3">
            <p:autoUpdate on="event1"/>
        </h:outputText>

        <h:outputText id="displayEvent2" value="Event2: #{observerView.text}" styleClass="p-d-block p-mb-3">
            <p:autoUpdate on="event2"/>
        </h:outputText>
    </h:form>
</div>