I've find a few situations where I need to suppress HTML formatting, add
columns, or hide columns depending on whether I'm outputing to the web or to
an export format.

This is a version of the ColumnTag that can be flagged as supporting only
certain media types.  It requires a change to the TableTag; the table does
not expose the current export type, so I added a getter for it.

I'm also attaching a simple Cactus JspTestCase, MediaTest.  If you aren't
familiar with Cactus, it lets you run test cases on the server as if they
were just regular JUnit tests.  A deployable cactify'd war is over 2megs,
and so I don't think makes a good email to the list :)

KnownValues is a test data provider where the data is not random, and can be
asserted for.

TLD Change:
  <tag>
    <name>column</name>
    <tagclass>org.displaytag.tags.ColumnTagMediaSupported</tagclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>media</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
        ..

Attachment: org.zip
Description: Zip compressed data

Attachment: displaytag.tld
Description: Binary data

Reply via email to