Thursday, April 5, 2018

Re: Form Panel SubmitCompleteEvent not triggered

GWT submits a FormPanel into an iframe and then waits for the iframe to fire a load event in order to fire a SubmitCompleteEvent. Looks like Firefox and Safari do not fire a load event on the iframe in case loading fails with status code 400. I am unsure if Chrome or Firefox / Safari behave correctly.

The only workaround I could think of is using XMLHttpRequest and send the data to the server yourself (and thus gain access to the http status code) : https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects Browser support is pretty good: https://caniuse.com/#search=formdata

GWTs XMLHttpRequest does not have an API for it built-in but with JsInterop / JSNI or Elemental you can easily make it work.

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment