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 <[EMAIL PROTECTED]> 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();
}