0
My question is: How can I execute one <p:confirm>
through the Bean?
I will explain the problem better. During the insertion of a record I need to check if it already exists in the list in which I am entering the CPF. So far so good. I give a message with FacesMessages SEVERITY_ERROR
and ready!
But there is a business rule that should check whether in the last 6 months the record, in the CPF case, already participated in another form. In this case the rule says that a question must be asked to the user if he confirms the new insertion.
Well, when I do the Bean check, I don’t know how to render a component on the screen for the user to confirm and continue the processing, ie the insertion of the record in this new form!
It is possible to do this?
Rafael, I can capture in Bean which button was pressed, for example if the button was pressed 1 or button 2?
– Marcelo Gomes
Deep inside the
confirm
you can put two buttons and set oneactionListener
for each.– Rafael
I did and it worked in parts. It turns out that even doing so I’m not able to divert the flow within the bean and when pressed I don’t, I need to shut down the continuation of the bean. so that the input does not occur. When pressed yes, I must allow.
– Marcelo Gomes