I have a command button like this:
<a4j:commandButton
action="#{Bean.process}"
value="Do Something"
onclick="Richfaces.showModalPanel('waitbox')" />
and the modal panel looks like this:
<rich:modalPanel autosized="true" id="waitbox" rendered="true">
<f:facet name="header">
<h:outputText value="Please wait..."></h:outputText>
</f:facet>
<h:graphicImage value="/images/wait.gif"/>
</rich:modalPanel>
The Bean.process does it stuff and creates a file in a temporary location (the full path to the file and the filename are in Bean.fileloc). Once this file has been created, I want the modalpanel to close and for the file to be sent to the user via a download box - this I have
no clue how to perform.
Can anybody shine a light on what I should be doing, if what I already have is wrong or how to go about doing it (I am willing to read if someone gives me hints and points in the right direction).