I found a way that is less hacked and works well. The idea is a hidden commandButton .
Unfortunately, the display:none style cannot be used, because then commandButton will be ignored. visibility:hidden not good because it saves the reserved space of the component.
But we can fine-tune the style so that the size of its appearance is zero with the following CSS:
.zeroSize { visibility: hidden; padding: 0px; margin: 0px; border: 0px; width: 0px; height: 0px; }
And now all that is required:
<h:commandButton value="" action="#{bean.save}" class="zeroSize" />
This will lead to the appearance of an invisible command button, which, in accordance with the rule of the first-next-send button, can be activated.
icza May 12 '14 at 12:00 2014-05-12 12:00
source share