Reputation: 11342
Is there a way for JSF to output something like this:
<button type="submit" ...></button>
I know that you are supposed to use <:hcommandButton />
normally but it outputs a <input type="submit">
instead and the front end developer wants to put a <i />
inside the button to have icons inside using font awesome.
Would be great if we could avoid using a custom component...it's pretty tedious.
Thanks.
Upvotes: 0
Views: 1343
Reputation: 1108672
Yes, it's the <h:button>
.
<h:button value="Label" outcome="page.xhtml" />
PrimeFaces has a more customizeable one as <p:button>
.
Note that you can also just write down plain HTML in JSF and if necessary just wrap it in a composite component or a tag file.
Upvotes: 3
Reputation: 415
<h:button> output is <input type="button">
and not <button>
output in HTML
Upvotes: 0