mibrahim.iti
mibrahim.iti

Reputation: 2060

Re-render <h:graphicImage by <p:commandButton

Lets assume i have next graphic image tag inside a form

<p:lightBox styleClass="imagebox " id="imageLightBox" rendered="true">
   <h:outputLink value="http://..../center/#{myBean.centerId}/picture" title="Bla bla bla">
       <h:graphicImage value="http://..../center/#{myBean.centerId}/picture" />
   </h:outputLink>
</p:lightBox>

and i have next primefaces command button

<p:commandButton icon="fa fa-save" value="Save" title="Save" actionListener="#{myBean.saveCenterImage()}" update="@form" >

So how can i re-render graphicImage when i click on commandButton.

Upvotes: 2

Views: 631

Answers (1)

Alec Jones
Alec Jones

Reputation: 96

I think you need to use p:graphicImage instead of h:graphicImage and set the attribute cache=false so that the browser will not cache the image.

Upvotes: 3

Related Questions