0 Replies Latest reply on Aug 10, 2010 5:05 AM by Adam Kowalewski

    HTML area in a PDF and convertDateTime tag

    Adam Kowalewski Newbie


      I generate PDF files in which p:html areas are used to create the layout. Now I would like to output inside of such a p:html block some date elements. I tried to achieve it with p:text tag:

      <p:text value="#{pdfControl.creationDate}"><s:convertDateTime pattern="yyyy"/></p:text>

      but when i read this exception i assume that inside of a html area i can't use any other tags.

      java.lang.RuntimeException: illegal child element
           at org.jboss.seam.pdf.ui.UIHtmlText.handleAdd(UIHtmlText.java:137)
           at org.jboss.seam.pdf.ui.ITextComponent.add(ITextComponent.java:59)
           at org.jboss.seam.pdf.ui.ITextComponent.addToITextParent(ITextComponent.java:132)
           at org.jboss.seam.pdf.ui.ITextComponent.encodeEnd(ITextComponent.java:227)
           at org.jboss.seam.pdf.ui.UIOutputText.encodeEnd(UIOutputText.java:27)
           at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)

      EL is available inside of HTML. I could move the date conversion to 'pdfControl' but I'm somehow not very happy with this solution. For any ideas suggestions i will be very thankful.