O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

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

Time for action – using PanelGrid with rowspan and colspan features

Let us see how to use a panelGrid component's rowspan and colspan features.

  1. Create a panelGrid component and use rowspan and colspan attributes of <p:column> to specify number of rows or columns to span across:
    <p:panelGrid>
      <f:facet name="header">
        <p:row>
          <p:column colspan="5">
            Posts Statistics By Tag
          </p:column>
        </p:row>
        <p:row>
          <p:column >Tag</p:column>
          <p:column>Month</p:column>
          <p:column>Posts</p:column>
          <p:column>Total</p:column>
        </p:row>
      </f:facet>
      <p:row>
        <p:column rowspan="2">JSF</p:column>
        <p:column>JAN</p:column>
        <p:column>120</p:column>
        <p:column rowspan="2">270</p:column> </p:row> <p:row> <p:column>FEB</p:column> <p:column>150</p:column> </p:row> <p:row> <p:column ...

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