Brendan,
I saw your post on apache as follows:
Our application has a requirement to export certain data as a
comma-delimited file to the user. To do this, our action class does the
following:
response.setContentType("text/html");
response.setHeader("Content-Disposition", "attachment;filename=3D\"" +
defaultFileName + "\"");
PrintWriter out =3D response.getWriter();
...
out.println(data); // in a loop to output all the rows
...
facesContext.getApplication().getStateManager().saveSerializedView(faces
Context);
facesContext.responseComplete();
return null;
The above works fine in that, when the action is invoked, the user gets
the typical "file download" pop-up (with the options: open, save,
cancel, or more info). The pop-up gets displayed with following
checkbox checked and disabled: "Always ask before opening this type of
file."
The problem is that, if I press the "open" button, the same dialog
re-appears, but this time, the checkbox is enabled. Only after I hit
"open" again can I actually see the data. By contrast, if I hit the
"save" button, I only have to do that once.
Can anyone explain to me why I have to hit the "open" button twice on
the "file download" pop-up, given the code I've listed above?
I am currently working on an application that has the exact same error. Did
you ever get a fix for this? IF so, could you please tell me what it is?
Thank-you,
Ray Milburn
Senior Software Engineer
L3 Communications, GSI
-------------------
GO SPURS!!
-------------------