arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
FluidGrid
FluidGrid allows to set up a nice tight grid with items that have variable heights and widths. FluidGrid is a responsive grid. That means, the grid will reflow as the window size changes. Items can have any content: text, images, links, input fields, etc. They can be defined in a static or in a dynamic way as in data iteration components.

This example demonstrates how to design a responsive dynamic grid with input fields. This is similar to the DynaForm component in PrimeFaces Extensions, but the grid is not a fixed table in this case. It is responsive! Try to resize the browser window. Tip: You will achieve a consistent alignment across all field blocks if you place the labels above the input fields.

The attribute type of pe:fluidGridItem should match the corresponding type property of FluidGridItem.
Source

                <p:growl id="growl" showDetail="true" showSummary="true">
                <p:autoUpdate/>
            </p:growl>

            <pe:fluidGrid id="fluidGrid" value="#{fluidGridDynaFormController.items}" var="data"
                          resizeBound="false" hGutter="20" widgetVar="fluidGridWdgt" style="width:600px">
                <pe:fluidGridItem type="input">
                    <div class="dynaFormLabel">
                        <p:outputLabel for="txt" value="#{data.label}"/>
                    </div>
                    <p:inputText id="txt" value="#{data.value}" required="#{data.required}"/>
                </pe:fluidGridItem>
                <pe:fluidGridItem type="select" styleClass="select">
                    <div class="dynaFormLabel">
                        <p:outputLabel for="menu" value="#{data.label}"/>
                    </div>
                    <p:selectOneMenu id="menu" value="#{data.value}" required="#{data.required}">
                        <f:selectItems value="#{data.selectItems}"/>
                    </p:selectOneMenu>
                </pe:fluidGridItem>
                <pe:fluidGridItem type="calendar" styleClass="calendar">
                    <div class="dynaFormLabel">
                        <p:outputLabel for="cal" value="#{data.label}"/>
                    </div>
                    <p:calendar id="cal" value="#{data.value}" required="#{data.required}" showOn="button"/>
                </pe:fluidGridItem>
            </pe:fluidGrid>

            <p:commandButton value="Submit" style="margin-top: 10px;"
                             process="fluidGrid" update=":mainForm:fluidGrid :mainForm:inputValues"
                             oncomplete="if(!args.validationFailed) {PF('inputValuesWidget').show();}"/>

            <p:dialog header="Input values" widgetVar="inputValuesWidget">
                <p:dataList id="inputValues" value="#{fluidGridDynaFormController.items}" var="item"
                            style="margin:10px;">
                    <h:outputText value="#{item.data.label} : #{item.data.value}" style="margin-right:15px;"/>
                </p:dataList>
            </p:dialog>

            <h:outputStylesheet id="fluidGridCSS">
                .pe-fluidgrid-item {
                    width: 160px;
                    height: 60px;
                }

                .pe-fluidgrid-item input {
                    width: 150px;
                }

                .pe-fluidgrid-item.calendar input {
                    width: 120px;
                }

                .pe-fluidgrid-item.select .ui-selectonemenu {
                    width: 134px !important;
                }

                .dynaFormLabel {
                    font-weight: bold;
                    margin-bottom: 7px;
                }
            </h:outputStylesheet>
            
Components and more
Documentation
Attributes (move mouse over the names to see data types)
Name Description
bindingAn EL expression referring to a server side UIComponent instance in a backing bean.Default is generated.
fitWidthWhen true, grid fits within the container width.Default is false.
hGutterHorizontal gutter between items in pixels.Default is 0.
hasImagesWhen true, images are taken into account for layout (wait for load).Default is false.
idUnique identifier of the component in a namingContainer.Default is generated.
originLeftWhen true, items are laid out from left to right.Default is true.
originTopWhen true, items are laid out from top to bottom.Default is true.
renderedBoolean value to specify the rendering of the component, when set to false component will not be rendered.Default is true.
resizeBoundWhen true, layout is recalculated on window resize.Default is true.
stampSearch expression for element(s) to stamp - hidden during layout.
styleInline style for the grid.
styleClassStyle class for the grid.
transitionDurationCSS transition duration for layout changes.Default is 0.4s.
vGutterVertical gutter between items in pixels.Default is 0.
valueThe dynamic data model (e.g. DynaFormModel).
varName of the request-scoped variable that exposes the current row/control data.
varContainerIdName of the request-scoped variable that exposes the current container client id.
widgetVarName of the client-side widget variable.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 16.0.0-SNAPSHOT,PrimeFaces Extensions: 16.0.0-SNAPSHOT,JSF: Apache MyFaces Core 4.0 - Impl 4.0.3,Server: Apache Tomcat (TomEE)/10.1.52 (10.1.4),Build time: 2026-03-10 11:37