I'm using the FormPanel because I've got a FileUpload widget.
In old school, form submission goes to the server and results in a new
HTML page getting sent back to the browser. This is the effect I was
hoping for. In GWT, after form.submit, control returns to the GWT
entry point through the FormHandler.onSubmitComplete.
How can I get the effect of submitting the form and then having my
servlet (which processes the form) generate a new HTML page to replace
the current GWT entry point?
All the HTML I want to display came back in
FormSubmitCompleteEvent.getResults()
so is there a simple call I can make to replace the current page with
the HTML???
// the <html> tag has a rootElement id in it so this will replace the
document HTML
// with what comes back from the submit.
FormHandler.onSubmitComplete(FormSubmitCompleteEvent event) {
Element root = DOM.getElementById("rootElement");
DOM.setInnerHTML(root,html);
This doesn't really work for me though because my servlet is returning
an HTML page that contains a GWT entry point which makes an RPC at
onLoad time.
So we really need a FormPanel that can submit to the server and not do
a callback to the GWT page that submitted...
How bout a constructor like: FormPanel(boolean returnResultsToCaller)