14 Replies Latest reply on Apr 28, 2008 11:58 AM by ilya_shaikovsky

    IE7 responseComplete rendering Problem

    wbauer

      HI,
      I have just started using richfaces (3.1.1, myfaces 1.1.5 on tomcat 5.5.23) and everything seems to be perfect. BUT I?m facing the following rendering problem with rich:tree:
      I?m having a tree giving an overview over PDF files. If the user clicks on one ?tree-leaf? a detail panel shows metadata about the PDF and provides a download link. This works fine. However, whenever the user downloads the PDF (in a separate window), the next click on the overview tree shows the pdf source in the tree's window.
      After pressing the browser's back button the tree is shown again and everything works fine (until the user click on the download Link again)

      Here is what I do:
      The simple tree:

      <rich:tree switchType="ajax" reRender="detailPanel" value="#{myBean.treeNode}" var="item" nodeSelectListener="#{myBean.processSelection}" ajaxSubmitSelection="true"/>
      


      and the detail panel

      <a4j:outputPanel id="detailPanel">
       ...
       <h:commandLink action="#{myBean.getPdfDocument}" value="View PDF Document" target="_blank">
       </h:commandLink>
      ...
      </a4j:outputPanel>
      


      And in MyBean
      public String getPdfDocument() {
       FacesContext fc = FacesContext.getCurrentInstance();
       HttpServletResponse resp = (HttpServletResponse) fc.getExternalContext()
       .getResponse();
       resp.setContentType("application/pdf");
      
      //... get the selected pdf ...
      
      resp.getOutputStream().write(...);
      
      fc.responseComplete();
      



      As already stated this works fine with firefox. Am I doing something wrong or is this a bug?

      Any ideas, hints welcome
      Wolfgang