Submit on Enter in JSF


if you want to make a form submit with executing your action in JSF, what you can do is as follows:

<h:commandButton id="hidden" style="width:0px;height:0px;border:none" action="#{bean.doSth}" />

this is a hidden button and will execute your method.

Btw, if you use style=”display:none;”, it does not work in ie 🙂