Does Displaytag stash the "media type" in a page or request attribute?

Posted by Pointy on Stack Overflow See other posts from Stack Overflow or by Pointy
Published on 2010-05-07T13:08:11Z Indexed on 2010/05/08 4:28 UTC
Read the original article Hit count: 280

Filed under:
|

When you enable "export" from Displaytag, the tag code gives you links with special magic parameters that the tag recognizes as indicators that the table contents should be exported (as CSV, Excel, whatever). Well I'm interested in detecting the media type so that (for example) I can exclude columns that make no sense in an export (embedded action buttons, for one thing, or checkboxes for row selection).

I suppose I could write a table decorator and use that to stick the media type on the request, but it'd be nice to avoid that if the tag already does it. The documentation is not clear on the subject; I guess I can start digging through the source code too.

© Stack Overflow or respective owner

Related posts about displaytag

Related posts about jsp