1 Reply Latest reply on Sep 12, 2008 4:50 AM by andrei_exadel

    fileUpload - uploaded files information disappears after upl

      Hi all,

      i'm using fileUpload inside outputPanel. After the upload, the information of uploaded files disappears from list. Relevant code:

      <a4j:outputPanel id="opUpload" ajaxRendered="true">
      <rich:panel id="pnUpload" binding="#{testFileUpload.pnUpload}" />
      </a4j:outputPanel>
      


       public TestFileUpload() {
       FacesContext fc = FacesContext.getCurrentInstance();
       this.pnUpload = new HtmlPanel();
       this.pnUpload.setStyle("background-color: blue; width: 400px; margin-left: auto; margin-right: auto;");
      
       HtmlFileUpload fu = new HtmlFileUpload();
       fu.setMaxFilesQuantity(5);
       fu.setListHeight("100px");
       fu.setListWidth("400px");
       Application app = fc.getApplication();
      
       ValueBinding vb = app.createValueBinding("#{testFileUpload.files}");
       fu.setUploadData(vb);
      
       Class[] args1 = {UploadEvent.class};
       MethodBinding mb3 = app.createMethodBinding("#{testFileUpload.listener}", args1);
       fu.setFileUploadListener(mb3);
      
       this.pnUpload.getChildren().add(fu);
       }
      


      If i take out the outputPanel, it works perfectly. But i really need the outputPanel as a "wrapper". Any suggestion? Thanks.