Download file after dialog

2007-11-09 Thread Oscar Reitsma
Good Day, I am having an issue downloading a file depending on parameters inputted on a dialog. Perhaps someone could point me in the right direction Basically required functionality is as follows: - A user clicks on a link to generate a report. - A dialog pops up where the user can input

Re: Download file after dialog

2007-11-09 Thread Matthias Wessendorf
I think partialSubmit must be false on the parent component (the one that contains the listener) -M On Nov 9, 2007 1:15 PM, Oscar Reitsma [EMAIL PROTECTED] wrote: Good Day, I am having an issue downloading a file depending on parameters inputted on a dialog. Perhaps someone could point me in

Re: Download file after dialog

2007-11-09 Thread Oscar Reitsma
Hi Matthias, Thanks for your response. That is one of the puzzling things. neither the commandLink launching the dialog, nor the commandButton that causes the returnFromDialog method to be called uses partial submit. As for the exception resulting from the 2nd process outlined in my original

Re: Download file after dialog

2007-11-09 Thread Matthias Wessendorf
sounds like that this happens. download inside the dialog possible ? On Nov 9, 2007 2:30 PM, Oscar Reitsma [EMAIL PROTECTED] wrote: Hi Matthias, Thanks for your response. That is one of the puzzling things. neither the commandLink launching the dialog, nor the commandButton that causes the

Re: Download file after dialog

2007-11-09 Thread Oscar Reitsma
Download works perfectly inside the dialog. I thought a workaround would be to simply navigate the dialog to a confirmation page which the user could then dismiss, however, it seems that the dialog refuses to navigate after the download. (Without any download action, the navigation works

Download File

2007-09-13 Thread Wolfgang
Hi, is there any kind of a jsf component with which I can download files? I need just a simple download-button on my webpage. Cheers!

Re: Download File

2007-09-13 Thread Matthias Wessendorf
Trinidad has an actionlistener for that. If you aren't using trinidad, you still can take a look at the code and use its logic. -Matthias On 9/13/07, Wolfgang [EMAIL PROTECTED] wrote: Hi, is there any kind of a jsf component with which I can download files? I need just a simple

Re: Download File

2007-09-13 Thread Wolfgang
Which Trinidad component should that be?? Can I also use the upload file component for downloading? Trinidad has an actionlistener for that. If you aren't using trinidad, you still can take a look at the code and use its logic. -Matthias On 9/13/07, Wolfgang [EMAIL PROTECTED] wrote: Hi,

Re: Download File

2007-09-13 Thread Volker Weber
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_fileDownloadActionListener.html Regards, Volker 2007/9/13, Wolfgang [EMAIL PROTECTED]: Which Trinidad component should that be?? Can I also use the upload file component for downloading? Trinidad has an actionlistener for that.

Re: Download File

2007-09-13 Thread Matthias Wessendorf
On 9/13/07, Wolfgang [EMAIL PROTECTED] wrote: Which Trinidad component should that be?? no component; an actionListener. See the doc: http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_fileDownloadActionListener.html source is here:

Re: Download File

2007-09-13 Thread Mikael Andersson
You can also do this with plain jsf in a action method. Search for this method getInstrumentsBySecCodePattern on this page : http://wiki.apache.org/myfaces/Exporting_DataTable_To_MS-Excel That method could easily be changed into a normal action method. Seem to remeber there was a page in the

Re: Download File

2007-09-13 Thread Mikael Andersson
Sorry wrong method name, should be exportHtmlTableToExcel, copy pasting is difficult ;) On 13/09/2007, Mikael Andersson [EMAIL PROTECTED] wrote: You can also do this with plain jsf in a action method. Search for this method getInstrumentsBySecCodePattern on this page :

Download file from server to local

2007-08-20 Thread xiao wang
, no window pops up. But the file in the server side does be deleted after the button is clicked. any idea? Thanks a lot in advance. Below is the method to download file from server: public void downloadFile(){ javax.faces.context.FacesContext conText

Re: Download file from server to local

2007-08-20 Thread Scott O'Bryan
. any idea? Thanks a lot in advance. Below is the method to download file from server: public void downloadFile(){ javax.faces.context.FacesContext conText = javax.faces.context.FacesContext.getCurrentInstance(); javax.servlet.http.HttpServletResponse response

Re: download file breaks lifecycle

2007-01-19 Thread CarlHowarth
://www.kyub.com/blog/ - La programmazione è per un terzo interpretazione e per due terzi ispirazione. E per un terzo mistificazione -- View this message in context: http://www.nabble.com/download-file-breaks-lifecycle

Download file component by jsf?

2007-01-05 Thread Chen, Wei
Hi, JSF has the uploadFile component and can use this to upload a file onto the server. But how can I download a file? Or what I want is: if I click a hyber-link, a download file dialog will be shown and the file will be saved in local. How can I do that with jsf? Regards Wei

Re: Download file component by jsf?

2007-01-05 Thread Holger Prause
Chen, Wei schrieb: Hi, JSF has the uploadFile component and can use this to upload a file onto the server. But how can I download a file? Or what I want is: if I click a hyber-link, a download file dialog will be shown and the file will be saved in local. How can I do that with jsf

Re: Download file component by jsf?

2007-01-05 Thread Craig McClanahan
On 1/5/07, Holger Prause [EMAIL PROTECTED] wrote: Chen, Wei schrieb: Hi, JSF has the uploadFile component and can use this to upload a file onto the server. But how can I download a file? Or what I want is: if I click a hyber-link, a download file dialog will be shown and the file

download file breaks lifecycle

2006-12-29 Thread ::SammyRulez::
Hello and happy new year Im' using this action method to generate dynamicaly pdf file and send them to the browser public String generaContratto(){ FacesContext facesContext = FacesContext.getCurrentInstance(); HttpServletResponse response = (HttpServletResponse)

Re: download file breaks lifecycle

2006-12-29 Thread David Chandler
Simply add these two lines of code before the call to responseComplete(): // Save serialized view or else after clicking on the export button, user will have to click TWICE to invoke another action // See http://swforum.sun.com/jive/thread.jspa?threadID=63566

Re: download file breaks lifecycle

2006-12-29 Thread Jeff Bischoff
David, Thanks for the hint. Though I didn't ask the question, I have seen this behavior on one or two of my pages. Now I'll have a chance to fix it perhaps. Hmm... I went to the link your code points to, but there was really no mention of *why* this solution works. Do you know who

Re: Download file q

2005-12-23 Thread Mike Kienenberger
Keith, Thanks for this tip. I haven't experienced this behavior (svn Myfaces, facelets 1.0, firefox 1.0.7, client-side state saving) even though I don't have this line of code. Can you explain that the problem is and why saveSerializedView() solves it? I'd like to know if I'm going to be hit by

Re: Download file q

2005-12-21 Thread Keith Lynch
With the code above you'll run into a problem whereby on the page a click seems to be ignored after the download.Put this before responseComplete to fix things up.context.getApplication().getStateManager().saveSerializedView(context); On 12/19/05, Mike Kienenberger [EMAIL PROTECTED] wrote: On

Re: Download file q

2005-12-20 Thread Marius Oancea
Yes is possible. HttpServletResponse response = (HttpServletResponse) facesContext .getExternalContext().getResponse(); ServletOutputStream out; try { out = response.getOutputStream(); if (currentItem.getDocument() != null) { log.info("Attached document exists for " + currentItem);

Download file q

2005-12-19 Thread Anu Padki
Is it not possible to download a file using action method? Do we have to write a servlet? Thanks. - Anu

Re: Download file q

2005-12-19 Thread Mike Kienenberger
On 12/19/05, Anu Padki [EMAIL PROTECTED] wrote: Is it not possible to download a file using action method? Do we have to write a servlet? Nope. Here's how I do it. public String downloadContentData() { Content selectedContent =

Re: Download file from browser problem - two clicks

2005-09-03 Thread Dennis Byrne
I had this problem a few days ago w/ 1.0.9 but I can't reproduce it. Original message Date: Sun, 04 Sep 2005 01:38:12 +0200 From: Jaroslav Rychna [EMAIL PROTECTED] Subject: Re: Download file from browser problem - two clicks To: users@myfaces.apache.org Hi, did you solve

Download file with jsf

2005-08-20 Thread Carsten Burghardt
Hi, does anybody know an easy way to stream a file to the browser with jsf? My current solution is a commandLink that calls a blank jsf page with some parameters and this contains a forward to a servlet that does the streaming. The problem is once the user has opened a file, myfaces somehow

Re: Download file with jsf

2005-08-20 Thread Enrique Medina
http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html2005/8/20, Carsten Burghardt [EMAIL PROTECTED]:Hi,does anybody know an easy way to stream a file to the browser with jsf? My current solution is a commandLink that calls a blank jsf page with someparameters and this contains a forward to

AW: Download file with jsf

2005-08-20 Thread Tim Peteler
Further information on: http://www.onjava.com/pub/a/onjava/excerpt/java_cookbook_ch18/?page=6 I solved this problem this way: public void exportFile() { FacesContext context = FacesContext.getCurrentInstance(); HttpServletResponse response =

Re: AW: Download file with jsf

2005-08-20 Thread Carsten Burghardt
Am Saturday 20 August 2005 13:07 schrieb Tim Peteler: Further information on: http://www.onjava.com/pub/a/onjava/excerpt/java_cookbook_ch18/?page=6 Thanks, my servlet looks similar ;-) I solved this problem this way: public void exportFile() { FacesContext context =

Re: Download file with jsf

2005-08-20 Thread Carsten Burghardt
Am Saturday 20 August 2005 12:15 schrieb Enrique Medina: http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html Thanks for the link but this is about uploading a file, not downloading. Or is this somehow connected? The download actually works well with the servlet but I have to separate

AW: AW: Download file with jsf

2005-08-20 Thread Tim Peteler
: Download file with jsf Am Saturday 20 August 2005 13:07 schrieb Tim Peteler: Further information on: http://www.onjava.com/pub/a/onjava/excerpt/java_cookbook_ch18/?page=6 Thanks, my servlet looks similar ;-) I solved this problem this way: public void exportFile() { FacesContext context

Re: How to open page and download file in one turn?

2005-07-02 Thread Csík Norbert
Hi! I think you should send 2 requests to the server. On the first request you generate the response page, and the response file, and send the generated page. On the response page You should put some trick (eg. a non-visible iframe) to post the second request to download the generated file too.

How to open page and download file in one turn?

2005-06-29 Thread Kołoszko Paweł
I havepageB opened from page A. Iinsert some data on pageB and submit the form. Then action is performed which generates Word document. After that it returns to page A. The problem is: how to open page A and then download automatically generated document? I know how to open page A, I know

Re: How to open page and download file in one turn?

2005-06-29 Thread Mike Kienenberger
On 6/29/05, Kołoszko Paweł [EMAIL PROTECTED] wrote: I have page B opened from page A. I insert some data on page B and submit the form. Then action is performed which generates Word document. After that it returns to page A. The problem is: how to open page A and then download automatically

RE: How to open page and download file in one turn?

2005-06-29 Thread Srikanth Madarapu
can you have a form onLoad method run some code and trigger the download ? -Original Message-From: Koloszko Pawel [mailto:[EMAIL PROTECTED]Sent: Wednesday, June 29, 2005 12:09 PMTo: MyFaces DiscussionSubject: How to open page and download file in one turn? I havepageB

RE: download file+https+tomcat+i exploder

2005-06-02 Thread albartell
content-type and I didn't have two carriage return line feeds after the header (doh!). HTH, Aaron Bartell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 4:43 AM To: users@myfaces.apache.org Subject: download file+https+tomcat+i exploder

Re: Download file from browser problem - two clicks

2005-04-25 Thread Heath Borders
The reason the user has to click twice is because the application state is not getting saved properly for some reason. My advice would be to just give the user an h:outputLink / to your file rather than writing it out yourself. On 4/22/05, Aaron Bartell [EMAIL PROTECTED] wrote: Below is the

RE: Download file from browser problem - two clicks

2005-04-25 Thread Korhonen, Kalle
, April 25, 2005 6:41 AMTo: 'MyFaces Discussion'; [EMAIL PROTECTED]Subject: RE: Download file from browser problem - two clicks That is the way I originally had it a couple months ago, but I have a large repository of documents and to do what you are suggesting I would need

RE: Download file from browser problem - two clicks

2005-04-25 Thread Aaron Bartell
Bartell From: Korhonen, Kalle [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 12:14 PM To: MyFaces Discussion Subject: RE: Download file from browser problem - two clicks Aaron, Don't have a fix for you, but why don't you just write a specific servlet for downloading files

Re: Download file from browser problem - two clicks

2005-04-23 Thread Aris Bartee
I wrapped my download code in an event method: foo(ActionEvent event). The immediate attribute for the uicommand tag should be true. --- Aaron Bartell [EMAIL PROTECTED] wrote: Below is the problem I am still having that I am wondering if anyone has found a solution to. Is there a way to make

RE: Download file from browser problem - two clicks

2005-04-23 Thread albartell
(); } } } -Original Message- From: Aris Bartee [mailto:[EMAIL PROTECTED] Sent: Saturday, April 23, 2005 9:05 AM To: MyFaces Discussion Subject: Re: Download file from browser problem - two clicks I wrapped my download code in an event method: foo(ActionEvent event

RE: Download file from browser problem - two clicks

2005-04-23 Thread Aris Bartee
] Sent: Saturday, April 23, 2005 9:05 AM To: MyFaces Discussion Subject: Re: Download file from browser problem - two clicks I wrapped my download code in an event method: foo(ActionEvent event). The immediate attribute for the uicommand tag should be true. --- Aaron Bartell [EMAIL