4 Replies Latest reply on Apr 30, 2010 8:31 AM by hesher

    FileUpload does not refresh the page/component on fileuploadcomplete.




      A screenshot of the webpage before I explain the problem:


      The fileUpload component in the right upper corner loads a file and then alters the left panel by adding a few rows (like the three already shown).

      The rows are HTMLPanelGrid objects.

      The new rows are added from the fileuploadeventlistener functions.


      If I refresh the page manually after the rows were added they are visible, but nothing happens if I don't refresh automatically.

      I tried to use the a4j:support with onfileuploadcomplete and reRendering the PanelGrid which is the left panel that holds the rows.

      Also tried to reRender the new rows themeselves.


      Nothing seems to work. It doesn't refresh..

      It seems that only the fileupload component doesn't refresh, the other buttons work great.

      Just incase anyone want's to check out the implementation (Reduced...):


      private void addRichFileUpload(UIComponent grid) {
      HtmlFileUpload upload = new HtmlFileUpload();
      upload.setAddControlLabel("Load Script");
      new Class[] { UploadEvent.class }));
      updateComponentOnUploadComplete(upload, "LeftColumn, newbutton1, newbutton2"); 
      public void uploadScriptEventListener(UploadEvent uploadEvent) throws ScriptManagerException {
      System.out.println("Script Upload Complete");
      // Add New Rows To Left Column....
      public static void updateComponentOnUploadComplete(
                UIComponent componentToListenTo, String componentToReRenderID) {
           HtmlAjaxSupport support = new HtmlAjaxSupport();


      Any suggestions?