aspose file tools*
The moose likes JSF and the fly likes downloading generated report in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "downloading generated report in JSF" Watch "downloading generated report in JSF" New topic
Author

downloading generated report in JSF

chono ken
Greenhorn

Joined: Jan 04, 2005
Posts: 6
Hi all,

how I do download a generated data like a file.
I prefer to do it in JSF than JSP/servlet.
When user clicks on the first JSF "download report" button and server should display the second JSF and (popup) dialog window "save or open".


thanks.
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
I would use a servlet and be done with it. JSF is overkill.
chono ken
Greenhorn

Joined: Jan 04, 2005
Posts: 6
any idea, please.

I need to do it in JSF.

thanks.
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
What I do is create a normal <form> using a <f:verbatim> tag. Then form targets _blank and the href is a servlet which gets the report parameters (or can query them from session)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

"To a small child with a hammer, every problem looks like a nail."

JSF isn't designed to do file transfers or render reports. It's geared towards UI-type stuff. For what you want, a servlet is simpler.

Just because the UI components of your webapp are JSF doesn't mean you must force everything in the webapp to go through JSF. After all, JSF itself is just a servlet and some support libraries.


Customer surveys are for companies who didn't pay proper attention to begin with.
chono ken
Greenhorn

Joined: Jan 04, 2005
Posts: 6
I figured this out.
Here's link, where I've found solution of the problem.
http://forum.java.sun.com/thread.jspa?threadID=662942
May be help to someone, who has similar problem.
[ February 28, 2006: Message edited by: chono ken ]
 
Consider Paul's rocket mass heater.
 
subject: downloading generated report in JSF