O'Reilly logo

PrimeFaces Cookbook by Mert Çalışkan, Oleg Varaksin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Panel grid with colspan and rowspan support

The panelGrid component extends the JSF <h:panelGrid> component with support of colspan, the number of columns a cell should span, and rowspan, the number of rows a cell should span, and the theming ability.

How to do it...

A basic definition for the panel grid would be as follows:

<p:panelGrid columns="2"> <f:facet name="header">User Information</f:facet> <h:outputLabel for="firstname" value="First Name" /> <p:inputText id="firstname" value="" label="firstname" /> <h:outputLabel for="lastname" value="Last Name" /> <p:inputText id="lastname" value="" required="true" label="lastname"/> <f:facet name="footer"> <p:commandButton type="button" value="Save" icon="ui-icon-check" style="margin:0"/> </f:facet> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required