H: graphicImage does not load when its value is updated via f: ajax

I have an image component on a page:

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

      

And down the page I have a commandLink that contains:

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

      

When I click on the command link, all sections of the page are refreshed. This also includes src

images. So, I can see in firebug that h:graphicImage

it updates successfully.

Now the problem is that even when updating the src

new image is not being downloaded from the server and so I get "X" where the image should be displayed. When I right click on the image and click "View Image", it loads successfully.

My question is, is there another way to update h:graphicImage

using ajax or is there some other measure I should take to complete the intended behavior?

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

Thank,

Serkan

+3


source to share


1 answer


This could be a browser related issue. Have you tried to disable browser cache?



0


source







All Articles