Ajax Framework - Fragment

Fragment component is used to define automatically partially process and update sections whenever ajax request is triggered by a descandant component. In this example, required input field outside the fragment is ignored and only the contents of the fragment are processed-updated automatically on button click since button is inside the fragment. Fragment makes it easy to define partial ajax process and update without explicitly defining component identifiers.

    <h:panelGrid columns="2" cellpadding="5">
        <p:outputLabel for="ignored" value="Required" />
        <p:inputText id="ignored" required="true" />

        <p:autoUpdate />
        <h:panelGrid columns="4" cellpadding="5">
            <p:outputLabel for="txt" value="Text Value:" />
            <p:inputText id="txt" value="#{basicView.text}" />
            <p:commandButton value="Submit"/>
            <h:outputText value="#{basicView.text}" />


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

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega


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