How can I cancel a form submission using GWT?
I need to check the form and process some data before submitting it.
So far I have done the following: the problem is that the form is submitted even if SubmitEvent is canceled.
form.addSubmitHandler( new SubmitHandler() { @Override public void onSubmit(SubmitEvent event) { if(validate()) {
Is this a GWT problem? How can I do it?
edit: I just found out that if it was a button that uses click.submit () when clicked, the send event is canceled. However, if the SubmitButton button is pressed, the event is not canceled.
So, I think this is the behavior of the browser. However, I need to find a way ...
edit: it just turned out that this happens only in development mode, I still have not tried stupidly to use external development mode.
source share