5 Replies Latest reply on Apr 11, 2008 9:49 AM by jhedden

    page refresh after uploading image

    abcd1

      hii everyone

      i am using s:fileUpload component to upload an image
      after the uploading is complete i have to show the preview of the uploaded image.

      but the image is not refreshing. i am using a4j:support to refresh rerender the image component
      the code is

      <h:form id="insertForm" enctype="multipart/form-data">
       <s:fileUpload id="attachment"
       data="#{fileUploadBean.uploadedFileData}"
       fileName="#{fileUploadBean.fileName}" />
       <a4j:region>
       <h:commandButton value=" Apply Changes " id="submitButton"
       action="#{fileUploadBean.uploadFile}">
       <a4j:support event="onsubmit" reRender="imgUpload"></a4j:support>
       </h:commandButton>
       </a4j:region>
       <rich:spacer height="20"></rich:spacer>
       <br />
       <h:graphicImage id="imgUpload" value="#{fileUploadBean.imageSrc}"></h:graphicImage>
       <h:outputText value="Image is : #{fileUploadBean.imageSrc}"></h:outputText>
       </h:form>
      


      but the image is not refreshing.
      do anybody know any solution

      thanks in advance
      cheers