0
I’m not getting the Submit in the form with just one click. When I click "Ok" the field loses the Focus and processes the ajax. Then I have to click again to send.
...
<p:outputLabel value="Teste:" />
<p:inputText value="#{testeController.campoTeste}" id="campoTeste">
<p:ajax listener="#{testePontoController.testeAjax}" event="blur" update="@this"/>
</p:inputText>
...
<p:commandButton value="Ok" action="#{testeController.cadastrarTest()}"/>
....
Does anyone know how to fix this?
Thank you
My dear, try using the 'process' parameter on your button (example: process="@this", or put the id of your form) and see if it resolves. If it works let me know, that put as answer.
– WyllianNeo
I took the test but it hasn’t worked yet. From what I understand, if the focus is in the field Testing, when I click the button OK the field loses focus and automatically goes to the method that ajax calls. I think I need to change the way it is now right... don’t use the Event=".
– Mamga
Add the process="@this" in the ajax of the Blur event otherwise it will not process the new value.
– Rafael
Same thing yet... :(
– Mamga
Solved... I’m no longer using the
event="blur"
. Now it’s being checked in Controller. Thank you– Mamga