Image does not appear in the project

Asked

Viewed 126 times

0

good morning, I am trying to put a pdf icon on my project, but it does not appear. I am using f:Facet this way.

   <h:commandLink>
       <p:graphicImage name="/resources/img/pdf.png"/>
    <p:dataExporter type="pdf" target="tbl" fileName="pdf" />
   </h:commandLink>

the image is in src/main/webapp/Resources/img/pdf.png

However the same does not render on the page

  • Michael, your question is not clear enough, I recommend you give this one a nice one post how to ask a valid question. Hugs!

1 answer

0


. JSF 2.x graphicImage In the JSF 2.0, you can render the image above through the concept of "resource library".

<h:commandLink>
    <h:graphicImage library="img" name="pdf.png"/>
    <p:dataExporter type="pdf" target="tbl" fileName="pdf" />
</h:commandLink>

https://www.mkyong.com/jsf2/jsf-2-graphicimage-example/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.