I am working on JSF 2.2
Font awesome 'fonts' work with html buttons of type submit. Since a <h:commandButton>
is exactly that; a button of type submit, why can't i add fon't awesome to it?
Is it a limitation of <h:commandButton>
in jsf?
My code:
<h:commandButton
styleClass="btn btn-default"
action="#{myBean.name}" >
<i class="fa fa-trash" style="font-size: 1em"> </i>
</h:commandButton>
I know that i can use <h:commandLink>
instead as described here. But when i am making a button, its not intuitive to make a link instead, which is what <h:commandLink>
appears as.