Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

15.7. Tables

Table structures can be created using the p:table and p:cell tags. Unlike many table structures, there is no explicit row declaration. If a table has 3 columns, then every 3 cells will automatically form a row. Header and footer rows can be declared, and the headers and footers will be repeated in the event a table structure spans multiple pages.
<p:document xmlns:p="https://jboss.com/products/seam/pdf"   
            xmlns:ui="https://java.sun.com/jsf/facelets"
            title="Hello">   
   <p:table columns="3" headerRows="1">
      <p:cell>name</p:cell>
      <p:cell>owner</p:cell>
      <p:cell>size</p:cell>
      <ui:repeat value="#{documents}" var="doc">
         <p:cell>#{doc.name}</p:cell>
         <p:cell>#{doc.user.name}</p:cell>
         <p:cell>#{doc.size}</p:cell>
      </ui:repeat>
   </p:table>
</p:document>

15.7.1. p:table

p:table supports the following attributes.
columns
The number of columns (cells) that make up a table row.
widths
The relative widths of each column. There should be one value for each column. For example: widths="2 1 1" would indicate that there are 3 columns and the first column should be twice the size of the second and third column.
headerRows
The initial number of rows which are considered to be headers or footer rows and should be repeated if the table spans multiple pages.
footerRows
The number of rows that are considered to be footer rows. This value is subtracted from the headerRows value. If document has 2 rows which make up the header and one row that makes up the footer, headerRows should be set to 3 and footerRows should be set to 1
widthPercentage
The percentage of the page width that the table spans.
horizontalAlignment
The horizontal alignment of the table. (See Section 15.8.2, “Alignment Values” for possible values)
skipFirstHeader
runDirection
lockedWidth
splitRows
spacingBefore
The blank space to be inserted before the element.
spacingAfter
The blank space to be inserted after the element.
extendLastRow
headersInEvent
splitLate
keepTogether

 
 
  Published under the terms of the Open Publication License Design by Interspire