0

I'm using JSF2.2.

Can I invoke a bean method from onclick attribute of h:button?

Or can I do it from PrimeFaces p:button component?

I want to use button in order to apply bootstrap css.

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
  • [``](http://www.primefaces.org/showcase/ui/ajax/remoteCommand.xhtml), since you have explicitly mentioned PrimeFaces. – Tiny Mar 08 '16 at 17:50
  • Does renders as html – Raul Verdesia Mar 08 '16 at 17:55
  • 1
    No. You can invoke a bean method via `` which can be triggered by an appropriate JavaScript event such as `onclick="func()"` ``. – Tiny Mar 08 '16 at 18:11
  • 1
    So you want to make all your pages complex, just to use bootstrap css? Why not use [BootsFaces](http://www.bootsfaces.net) then? Wayyyyy easier and based on PrimeFaces – Kukeltje Mar 08 '16 at 19:37
  • I didn't find good documentation / examples on BootsFaces. I made a try but didn't work as expected. Do you know of a site with examples? – Raul Verdesia Mar 08 '16 at 20:27
  • @BalusC I don´t think this question is duplicate, because neither h:button or h:commandButton render as – Raul Verdesia Mar 21 '16 at 16:19

0 Answers0