I have input text, and if enter key is pressed on this component following js for button programmatic click is executed:
document.getElementById('myform:saveNew').click();
The button jsf:
<h:commandButton value="test link" action="#{myBean.save()}" style="display:none;" id="saveNew">
<f:ajax render="interests" execute="@this"></f:ajax>
</h:commandButton>
Currently if I click enter on the input text, the whole form is submitted and reloaded. I think that AJAX is not working in this case, while if I removed display:none;
from the button (for testing) the AJAX and rendering is working fine.