| Issue 162: | Mozilla-1.7: FormPanel onSubmitComplete returns invalid results | |
| 13 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
GWT Release:
1.1.10
Detailed description:
Mozilla 1.7 automatically adds a top level DOM element to docuemnts that
only contain text. As a result, when FormPanel uses an hidden iframe to
post a form the results come back encapsulated in a <pre>...</pre> node.
For example, if server responds with the string "HELLO", FormPanel on
mozilla 1.7 will see "<pre>HELLO</pre>"
Workaround if you have one:
Links to the relevant GWT Developer Forum posts:
N/A
Instructions to reproduce:
com.google.gwt.user.client.ui.FormPanelTest#testMethodGet has the
appropriate case to reproduce the error.
FlowPanel panel = new FlowPanel();
form.setMethod(FormPanel.METHOD_GET);
form.setEncoding(FormPanel.ENCODING_URLENCODED);
form.setAction("/formHandler");
TextBox tb = new TextBox();
tb.setText("text");
tb.setName("tb");
FlowPanel panel = new FlowPanel();
panel.add(tb);
form.setWidget(panel);
RootPanel.get().add(form);
form.addFormHandler(new FormHandler() {
public void onSubmitComplete(FormSubmitCompleteEvent event) {
//event.getResults() will return "<pre>expected results</pre>"
}
public void onSubmit(FormSubmitEvent event) {
}
});
form.submit();
|
||||||||||
,
Feb 01, 2007
(No comment was entered for this change.)
Labels: Category-Other
|
|||||||||||
,
Apr 08, 2008
(No comment was entered for this change.)
Labels: Milestone-Planned
|
|||||||||||
|
,
Apr 29, 2008
Owner: knorton
|
|||||||||||
,
Oct 21, 2008
(No comment was entered for this change.)
Labels: -priority-medium
|
|||||||||||
,
Jan 30, 2009
Still occurs in GWT 1.5 |
|||||||||||
,
Jan 30, 2009
I forgot : reproduced with GWT 1.5 / Firefox 3 |
|||||||||||
,
Jan 31, 2009
AFAICT, this happens when the response is sent in text/plain. If you send the exact same bits with Content-Type: text/html, you'll get the expected result (well, it actually depends if your data contains HTML-like markup that could be moved to the parsed document's head, such as <title>, <link> and <meta>; this HTML-like data would in this case *not* be in event.getResult()) See the javadoc for the FormPanel() constructor: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FormPanel.html#FormPanel() |
|||||||||||
|
|
|||||||||||