0 Replies Latest reply on Apr 25, 2012 6:08 PM by jsmoorejr

    rich:fileUpload custom button being pushed down on upload

    jsmoorejr Newbie

      The project I am working on is currently using richfaces 3.3.3. I have disabled all buttons except for the "Add" button, or in our case, we have called it "Browse" and used the addControlLabel for that.

       

       

      <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}" maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"
           addControlLabel="Browse" immediateUpload="#{fileUploadBean.autoUpload}" listHeight="0" listWidth="auto"
           allowFlash="#{fileUploadBean.useFlash}" styleClass="float-left">
           <a4j:support event="onuploadcomplete" reRender="mainMsgPanel,upload,homeTable,errorPanelImage,panelErrorMessage,imageSuccessMessage"  />
           <a4j:support event="onsizerejected" reRender="mainMsgPanel,upload,homeTable,uploadMessage,panelErrorMessage,imageSuccessMessage,errorPanelImage"
                action="#{fileUploadBean.uploadRejected}" />
      </rich:fileUpload>
      

       

      Once a file is selected and "Open" button is pressed from the "File Upload" dialog window, the file will automatically upload the selected file. The problem is that once the "Open" button is pressed, the image for the button is pushed down, pretty much the full height of the button itself, but the "Browse" text is pushed to the right and the color of the text changes from white to black.

       

      This screenshot is what it should look like, prior to any file being uploaded:

      fileupload-start.jpg

       

      This screenshot is what it looks like just after selecting the file and pressing the "Open" button in the "File Upload" dialog window:

      fileupload-during.jpg

       

      Once it finishes the upload, the UI goes back to the correct layout as shown in the first screenshot. I am lost as to what could be causing this to happen. Does anyone have any thoughts?

       

      Thanks