1

I have problem on upload image. Image is uploading correctly but browser is not showing up the image. It shows only after refreshing the page.

<rich:fileUpload id="upload" 
    addControlLabel="Browse" autoclear="true"
    acceptedTypes="jpg, gif, png, bmp"
    maxFilesQuantity="1"
    fileUploadListener="#{BeanClass.fileUploadListener}" 
    listHeight="110px">
    <a4j:support event="onsizerejected"reRender="upload"/>
    <a4j:support event="onuploadcomplete" reRender="changepictureForm,scriptId" />
</rich:fileUpload>
Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
Satya Bali
  • 11
  • 1
  • Make sure your managed bean is session scoped or it is request scoped and you use `@KeepAlive` richfaces annotation in your request scoped managed bean class in order to make it survive among ajax requests. – Luiggi Mendoza May 06 '13 at 20:56
  • I've had issues with image upload before. What I noticed was this will work fine in some browsers (WebKit based Chrome or Safari) and fail in others (Gecko based FF). So finally I made a page refresh if the browser is not WebKit based. Not a solution, but it's a workaround. – Niks May 10 '13 at 10:15

0 Answers0