Hi!,
How can I avoid the enter key for the rich:inputNumberSpinner, I have try using oninputkeypress and calling a js like this
<r:inputNumberSpinner id="spinnerPorcentajeComisionista" value="#{pedidoBBean.porcentajeComisionista}" maxValue="33" minValue="0" oninputkeypress="return stopRKey(event)" cycled="true" required="#{pedidoBBean.comisionistaPorcentajeRequired}" disabled="#{pedidoBBean.comisionistaPorcentajeDisabled}"/>
this is the js function
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}
But is not working, any help would be appreciated cause not even an alert I get using oninputkeypress, there is another way or I’m doing something wrong?
Thanks.
Hi,
Its fixed by replacing the h:form whit a4j:form, or there is other way ?
Thanks