3 Replies Latest reply on Jan 30, 2014 11:12 AM by dev.hari

    Seam 2.3 PDF issue

    javacoryd

      We are converting a seam 2.1.1 app to Seam 2.3 and are having an issue with PDF generation.

       

      On our page we have a cell defined as such:

          

      <p:cell horizontalAlignment="right">

           <p:paragraph alignment="right">

              <p:text value="#{projectedTotals.someBigDecimal}">

                    <f:convertNumber type="currency" currencySymbol="$"/>

              </p:text>

             </p:paragraph>

      </p:cell>

       

      It fails on the converter with this error below.  It's trying to convert the BigDecimal value.

       

      @68,58 <f:convertNumber> Parent not an instance of ValueHolder: org.jboss.seam.pdf.ui.PdfUIDocument@6e0613b4

       

      For some reason it's not seeing the <p:text> as the parent???

       

      Thanks,

       

      Cory.

        • 1. Re: Seam 2.3 PDF issue
          maschmid

          Mostly the same code is in the itext example in the Seam distribution and that seems to be working (see itext-web/src/main/webapp/format.xhtml ).  Can you check that the example works for you? Perhaps check if the p: namespace is the correct one. It should be xmlns:p="http://jboss.org/schema/seam/pdf" in Seam2.3

          • 2. Re: Seam 2.3 PDF issue
            javacoryd

            Thanks for the response,

             

            So, after much research I found the issue to be the "sendRedirect="false"" attribute on <p:document>.  I posted the issue here:  https://community.jboss.org/thread/229030

             

            We set this attribute so the pdf renders "inline" inside the html with a <object data="some.pdf" .... /> tag.  However, with Seam 2.3 it doesn't render anything.  I'm not sure as to what to put as the parent of <p:document> so that it renders this way.   We currently put the <p:document> in a <h:form>, but that isn't an instance of ValueHolder.

             

            Thanks,

             

            Cory.

            • 3. Re: Seam 2.3 PDF issue
              dev.hari

              Thanks for sharing the information on this.

              Itext