I am using this code:
<p:commandLink id="downloadLink" value="Download" ajax="false">
<p:fileDownload value="#{supplierFileController.fileroute()}" />
</p:commandLink>
Works great. The only thing is that I shows a normal link. I want to use it with an image instead. Something like this:
<h:commandLink action="#{supplierFileController.destroy}">
<h:graphicImage title="Delete" value="/image/image.png"/>
</h:commandLink>
I have tried some combinations, but I havent been able to make it work.
Thanks in advance. Regards, Daniel
You can use something like this
Here a list of all available jquery Icons
jQueryUI Icons Cheatsheet N#1 (click on
Toggle text
to get all the names of the icons)jQueryUI Icons Cheatsheet N#2
Second option would be
try this class
Third Option would be
note that
images
folder should be located under theWebContent\resources
(take a look a this Resources (Library) In JSF 2.0)