• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

downloading generated report in JSF

 
chono ken
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would use a servlet and be done with it. JSF is overkill.
 
chono ken
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any idea, please.

I need to do it in JSF.

thanks.
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
chono ken
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic