Menu

Expression in Barcode tag

Help
Jim Riley
2004-02-17
2004-02-18
  • Jim Riley

    Jim Riley - 2004-02-17

    The barcode tag works if I use plain text as the content, example:
            <table columns="1" width="100">
                <cell halign="center" border-style="none">
                    <barcode type="CODE39" bar-height="10">1234</barcode>
                </cell>
            </table>

    However, I would like to put an expression inside the tag.  For example

            <table columns="1" width="100">
                <cell halign="center" border-style="none">
                    <barcode type="CODE39" bar-height="10">${MY_ID}</barcode>
                </cell>
            </table>

    When I use the expression, I get the following error:

    org.ujac.print.DocumentHandlerException: The character '{' is illegal in code 39.
        at org.ujac.print.DocumentPrinter.printDocument(DocumentPrinter.java:356)
        at com.kmm.pres.ujac.ContractGenerator.generateUJAC(ContractGenerator.java:52)
        at com.kmm.pres.ujac.ContractGenerator.main(ContractGenerator.java:71)
    Caused by: ExceptionConverter: java.lang.IllegalArgumentException: The character '{' is illegal in code 39.

    Is there anything I can do to get the expression evaluated?

     
    • Gianni Antini

      Gianni Antini - 2004-02-17

      Try this:

      <table columns="1" width="100">
      <cell halign="center" border-style="none">
      <barcode type="CODE39" bar-height="10"><![CDATA[${MY_ID}]]></barcode>
      </cell>
      </table>

       
    • Christian Lauer

      Christian Lauer - 2004-02-18

      Hi Jim,

      you're right, the support for dynamic barcodes has been missing so far. I've fixed this issue.

      Thanx for helping to make UJAC better.

      Best regards,
      Christian

       
    • Jim Riley

      Jim Riley - 2004-02-18

      Thanks,  I have found your print funcationality very useful.  I appreciate your responsiveness to issues.

       

Log in to post a comment.

MongoDB Logo MongoDB