Problem with Simple PDF Table
sandman202 Dec 15, 2009 2:18 PMI have a simple pdf using a table
<p:font size="8"> <p:table columns="4" widthPercentage="100" headerRows="1"> <f:facet name="defaultCell"> <p:cell padding="5" noWrap="true" horizontalAlignment="center" verticalAlignment="middle"/> </f:facet> <p:font size="8" color="white" style="bold"> <p:cell grayFill=".25"><p:paragraph>Item</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Medium</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Edition</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Number</p:paragraph></p:cell> </p:font> <ui:repeat var="_owner" value="#{exportOwnerPrintNumberList.ownerList}"> <p:font size="8"> <p:cell> <p:paragraph>#{_owner.number.edition.item.name}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.edition.mediumCode.description}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.edition.editionCode.description}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.sequence}</p:paragraph> </p:cell> </p:font> </ui:repeat> </p:table> </p:font>
When I run the pdf, there should be 4 columns containing 4 rows of data, but I only see the headers and the first row of data.
If I remove
<f:facet name="defaultCell"> <p:cell padding="5" noWrap="true" horizontalAlignment="center" verticalAlignment="middle"/> </f:facet>
then all 4 rows are displayed, but I do not have any alignment. If I add the alignment to each individual cell, then only the first row is aligned in the center and the rest are left justified.
Below is my full pdf:
<p:document xmlns="http://www.w3.org/1999/xhtml" xmlns:p="http://jboss.com/products/seam/pdf" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" title="PDF OwnerPrintNumbers" creator="Scott Duke" pageSize="LETTER"> <p:image value="/img/seamlogo.png"> <s:transformImageSize height="50" maintainRatio="true"/> </p:image> <p:font size="8"> <p:paragraph>#{optionsCache.load('companyName')}</p:paragraph> <p:paragraph>#{optionsCache.load('companyAddress1')}</p:paragraph> <p:paragraph rendered="#{optionsCache.load('companyAddress2') != null}">#{optionsCache.load('companyAddress2')}</p:paragraph> <p:paragraph>#{optionsCache.load('companyCity')}, #{optionsCache.load('companyState')} #{optionsCache.load('companyZip')}</p:paragraph> <p:paragraph>Phone #{optionsCache.load('companyPhone')}</p:paragraph> <p:paragraph rendered="#{optionsCache.load('companyFax') != null}">Fax #{optionsCache.load('companyFax')}</p:paragraph> <p:paragraph>Email #{optionsCache.load('companyEmail')}</p:paragraph> </p:font> <p:font size="18"> <p:paragraph spacingAfter="50">#{exportOwnerPrintNumberList.uzer.name}'s Print Numbers</p:paragraph> </p:font> <p:list> <ui:repeat value="#{exportOwnerPrintNumberList.ownerList}" var="_owner"> <p:listItem>#{_owner.number.edition.item.name} #{_owner.number.edition.mediumCode.description} #{_owner.number.edition.editionCode.description} #{_owner.number.sequence}</p:listItem> </ui:repeat> </p:list> <p:font size="8"> <p:table columns="4" widthPercentage="100" headerRows="1"> <f:facet name="defaultCell"> <p:cell padding="5" noWrap="true" horizontalAlignment="center" verticalAlignment="middle"/> </f:facet> <p:font size="8" color="white" style="bold"> <p:cell grayFill=".25"><p:paragraph>Item</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Medium</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Edition</p:paragraph></p:cell> <p:cell grayFill=".25"><p:paragraph>Number</p:paragraph></p:cell> </p:font> <ui:repeat var="_owner" value="#{exportOwnerPrintNumberList.ownerList}"> <p:font size="8"> <p:cell> <p:paragraph>#{_owner.number.edition.item.name}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.edition.mediumCode.description}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.edition.editionCode.description}</p:paragraph> </p:cell> <p:cell> <p:paragraph>#{_owner.number.sequence}</p:paragraph> </p:cell> </p:font> </ui:repeat> </p:table> </p:font> </p:document>
Can someone see or tell me why this is happening?
Thanks,
Scott