I worked around the problem like this: storing the name of the return file
in a property (FLASH, so it stays just for a single refresh), and returning
the contents of the file in onActivate, so when the page reloads the file
will be streamed back.  But this seems ugly :(  Still looking for a
solution....

public Object onActivate(EventContext ec) {
        if(null != resultFile) {
                File file = new File(resultFile);
                if(file.exists()) {
                         try {
                                        return new CsvStreamResponse(new
FileInputStream(file.getAbsolutePath()), file.getName());
                                } catch (FileNotFoundException e) {
                                        e.printStackTrace();
                                }
                }
        }
        
        return null;
    }




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/redirect-after-post-messes-with-my-StreamResponse-tp4763647p4763757.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to