Thank you again Thomas, that makes sense now :-) Peter On 27 led, 12:18, Thomas Broyer <[email protected]> wrote: > On Jan 27, 9:12 am, Peter Ondruska <[email protected]> wrote: > > > Thanks Thomas, for me it was not > > obvious:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...() > > > "Returns: the result html, or null if there was an error reading it" > > perhaps it would be more clear to state "Returns: HTML encoded result > > regardless of content type returned by servlet..." > > FormPanel submits to a hidden iframe, so it gets the result from the > iframe's content (hence the 'null' when you don't submit to the same > domain, because of the SOP), which is always seen as an HTML document, > even if it "represents" a text/plain or an image. > > The hint is in FormPanel's no-arg constructor's > javadoc:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...() > """ > The back-end server is expected to respond with a content-type of > 'text/html', meaning that the text returned will be treated as HTML. > If any other content-type is specified by the server, then the result > HTML sent in the onFormSubmit event will be unpredictable across > browsers, and the onSubmitComplete event may not fire at all. > > Tip: > The initial implementation of FormPanel specified that the server > respond with a content-type of 'text/plain'. This has been > intentionally changed to specify 'text/html' because 'text/plain' > cannot be made to work properly on all browsers. > """
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
