PrimeFaces 3.5 / Mojarra 2.1.5
Im trying to ignore ValueChangeListener when trying to click on Button and submit the form.Theres a way to do that without having to use immediate=True ?
<p:inputText id="txtMPM2S" value="#{ManagedBean.compPreco.valorDolar_mpm2}"
requiredMessage="#{bundle.lblMPM2Dolar} : #{bundle.campoObrigatorio}"
required="false" onkeypress="return isNumberKey(event)"
valueChangeListener="#{ManagedBean.calcularValorMPMReal}">
<p:ajax event="keyup" update="txtMPM2RS txtValorLucroTotal txtValorMargemLucroTotal"
process="txtMPM2S" ></p:ajax>
</p:inputText>
<p:commandButton id="btnSalvar"
value="#{ManagedBean.compPreco.id != null ? bundle.btnAlterar : bundle.btnSalvar}"
rendered="#{not ManagedBean.actionDelete}" icon="ui-icon-disk"
action="#{ManagedBean.salvar()}" ajax="false"
title="#{ManagedBean.compPreco.id != null ? bundle.alterarRegistro : bundle.salvarNovoRegistro}" />
I used onclick p:commandButton : return true or false regarding my condition...