0 Replies Latest reply on Dec 9, 2009 2:00 PM by ZJ DA

    rich:modalPanel not close after redirect

    ZJ DA Newbie

      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>
      


      The action listener redirect it to a download servelet:
      FacesContext facesContext = FacesContext.getCurrentInstance();
      facesContext.getExternalContext().redirect(
       getSessionInfo().getFileUri((String) bean.getResult(), true));
      facesContext.responseComplete();
      


      After clicking the OK button, a new browser opened and ask if you want to download or open, which is expected. However, the modalPanel is not closed though theres is no any error. I also have a rich:modalPanel to display waiting messge:

      <a4j:status onstart="showModalInfoWindow();" onstop="hideModalInfoWindow()"></a4j:status>
      


      It never close either. My question is how to mark the ajax request completed in the action listener.

      Thanks in advance,
      -ZJ