Announcement Announcement Module
No announcement yet.
SWF 2.0 + JSF + JasperReports Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF 2.0 + JSF + JasperReports


    Right now I'm developing a software based on SWF 2.0 and JSF (Facelets).

    The problems seems to generate a report using JasperReports. I've found some examples on the web of this using the previous version of SWF and (of course) using WebMVC. There is a class named JasperReportsPdfView that seems to be the right one for this purpose.

    How can I do this using facelets, is there any way to render a PDF without the need to set a Model, if there isn't, is there any example on how to go from SWF Facelets to SWF Spring MVC and back from the same flow?

    Thanks in advance,
    Pedro Casagrande de Campos

  • #2

    I imagine that there is no easy answer for what I'm asking so I will present some alternatives that I'm testing.

    The first one is about the JasperReportsPdfView, but I'm using JSF, I not sure how to go from a context to another, it doesn't seems to be best option. This option was not tested.

    Other option is using a regular servlet, this solution is the easiest one, but I'm facing some difficulties on returning to the flow request, what I need is to the pdf to be downloaded using some parameter while I still on the same view-state.

    A third option that I saw, is to pass a externalContext to a simple POJO method on a service class. Is there any way to write a response and then be redirected to another state. I've not tried this solution yet.

    If anyone could give some directions on how to solve this problem (on how to generate a jasperreport on SWF2) I would be glad to post the entire solution here.

    Thanks in advance,
    Pedro Casagrande de Campos