How to make p:graphicImage clickable and invoke bean action
问题 I am using <p:graphicImage> like below: <div id="mapp"> <h3>Country Map</h3> <p:graphicImage id="city" value="#{countryPages_Setup.countryMap}" width="250" height="190"> </p:graphicImage> </div> But this is not a clickable image. How can I make this image clickable so when user click on it, I can invoke the managed bean action that I want. 回答1: Wrap your image in a h:commandLink / h:link : <h:commandLink action="..."> <p:graphicImage id="city" value="#{countryPages_Setup.countryMap}" width=