2

I have a command link as below.

<h:commandLink value="Home" action="homePage">
</h:commandLink>

This is working fine, but I need a image instead of text value. The image has to act as a command link.

How can I achieve this?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Rithik_Star
  • 651
  • 5
  • 14
  • 39

1 Answers1

7

You should remove value attribute and put <h:graphicImage> inside <h:commandLink>.

<h:commandLink action="homePage">
    <h:graphicImage value="resources/images/img.png" />
</h:commandLink>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
cmenti
  • 116
  • 4