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

    page refresh after uploading image

    vijay kumar Novice

      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"
       fileName="#{fileUploadBean.fileName}" />
       <h:commandButton value=" Apply Changes " id="submitButton"
       <a4j:support event="onsubmit" reRender="imgUpload"></a4j:support>
       <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>

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

      thanks in advance