An alternative solution is to abandon CSS use here, and rely on a extra nested tag "graphicImage" inside not a commandButton
, but a commandLink
instead :
<p:commandLink action="#{cancelMB.cancelList}" update="dataInfo" ajax="true" >
<h:graphicImage name="images/cancel.jpg" title="Cancel" />
</p:commandLink>