Tapping into the Tapestry generator


Web tier: servlets, JSP, Web frameworks: Tapping into the Tapestry generator

  1. Tapping into the Tapestry generator (1 messages)

    I am developing a web based time reporting tool using the Tapestry framework and in this tool I would like to generate reports in PDF-format.

    I would like to use the Tapetry framworks page generator for generating a suitable XML-format for later transformation to PDF. Does anyone know if it is possible in some way to use the generator in Tapestry to get a stream of data out instead of getting a page to the web browser ?

    In some way I imagine that I create a page manually (trying to overcome the common thing that pages are being abstract) and then call for instance renderPage() with my own specialised IMarkupWriter.

    Thankful for any ideas on the subject
  2. In Tapestry it's relatively easy to create an 'Engine Service' that is similar to a servlet and can stream out any content you want. If you are content to not use a page template and components and build your XML in a traditional way using DOM or SAX then this is the best way. The service can accept parameters through a ServiceLink component.

    I'm not sure how easy it would be to use components in a page that outputs XML, but it may be possible.

    I strongly suggest you post your question to the tapestry-user mailing list, it's an extremely friendly and helpful community. If you don't get a better answer here you'll definitely get one there.