문제

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...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top