the exact answer:
form.getElement().<FormElement>cast().setTarget("");
with this line you change the target parameter of the form, and now you redirect the main page to the action URL.
be careful that Window.Location.assign () creates a new GET request after your main POST !, so this is not the answer.
source share