myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: [Trinidad] tr:fileDownloadActionListener error
Date Thu, 05 Jul 2007 18:33:47 GMT
Could you send the full stack trace?  The ServletException must be
wrapping some other exception.

Also, could you try setting the init param

org.apache.myfaces.trinidad.CACHE_VIEW_ROOT

to false, and re-running your testcase?  I suspect that you'll find you blow
up *earlier* - the point being that what the fileDownloadActionListener does
as a side effect is flush the view root cache for that page, since state
saving
doesn't run when you download a file.  So it's not the
fileDownloadActionListener
per se, it's something else.

-- Adam



On 7/5/07, William Hoover <whoover@nemours.org> wrote:
>
> Using the tr:fileDownloadActionListener inside a tr:column I get the a
> javax.servlet.ServletException: Invalid index after the download completes
> and another link is clicked on the page. Has anyone experienced this?
>
> Page:
>
>   <tr:commandLink text="Download file">
>     <tr:sendFileActionListener
>        mimeType="application/pdf" fileName="#{myBean.fileName}"
>        sendFileListener="#{myBean.sendFile}"/>
>   </tr:commandLink>
>
> Bean:
>
>         public void sendFile(FacesContext context, OutputStream out)
> throws IOException {
>                 OutputStreamWriter w = new OutputStreamWriter(out,
> "UTF-8");
>                 w.write("Test");
>                 w.flush();
>         }
>
>

Mime
View raw message