Hi, I have a rich:modalPanel with a OK button to export file:
<a4j:commandButton id="okButton" styleClass="dialog_button" value="OK" type="submit" actionListener="#{navTree.exportListener}" oncomplete="#{facesContext.maximumSeverity == null ? 'Richfaces.hideModalPanel(\'exportDialog\');' : ''}"> </a4j:commandButton>
FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getExternalContext().redirect( getSessionInfo().getFileUri((String) bean.getResult(), true)); facesContext.responseComplete();
<a4j:status onstart="showModalInfoWindow();" onstop="hideModalInfoWindow()"></a4j:status>