简体   繁体   中英

h:graphicImage is not downloaded when its value is updated through f:ajax

I have an image component on a page:

<h:graphicImage value="/imageServlet?imageId=#{someBean.imageId}"/>

And down in the page I have a commandLink that contains:

<f:ajax execute="@form" render="@all"></f:ajax>

When I click on the commandlink, all sections in the page get updated. This also includes the src of image. So, I can see in firebug that the h:graphicImage gets successfully updated.

Now, the problem is, even though src is updated, the new image is not downloaded from the server, and therefore I get an 'X' where the image was supposed to appear. When I right click on the image and click 'view image', it is successfully downloaded.

My question is, is there some other way to update an h:graphicImage with ajax or is there some other measure I need to take to complete the intended behaviour?

Note: I am on Mojarra 2.1.6, Tomcat 7 and I'm not using any third party component suite.

Thanks,

Serkan

This may be a browser related issue. Have you tried disabling your browser cache?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM