简体   繁体   English

h:当通过f:ajax更新其值时,不会下载graphicImage

[英]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: 在页面中我有一个commandLink,其中包含:

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

When I click on the commandlink, all sections in the page get updated. 当我单击commandlink时,页面中的所有部分都会更新。 This also includes the src of image. 这还包括图像的src So, I can see in firebug that the h:graphicImage gets successfully updated. 所以,我可以在firebug中看到h:graphicImage被成功更新。

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. 现在,问题是,即使src被更新,新的图像也不会从服务器下载,因此我得到一个'X',其中应该出现图像。 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? 我的问题是,是否有其他方法用ajax更新h:graphicImage或者是否需要采取其他措施来完成预期的行为?

Note: I am on Mojarra 2.1.6, Tomcat 7 and I'm not using any third party component suite. 注意: 我使用的是Mojarra 2.1.6,Tomcat 7,我没有使用任何第三方组件套件。

Thanks, 谢谢,

Serkan 塞尔坎

This may be a browser related issue. 这可能是与浏览器相关的问题。 Have you tried disabling your browser cache? 您是否尝试过禁用浏览器缓存?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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