My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 162: Mozilla-1.7: FormPanel onSubmitComplete returns invalid results
13 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  knorton+personal@google.com
Type-Defect
Category-Other
Milestone-Planned


Sign in to add a comment
 
Reported by gwt.team.knorton, Sep 28, 2006
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();
Comment 1 by gwt.team.morrildl, Feb 01, 2007
(No comment was entered for this change.)
Labels: Category-Other
Comment 2 by br...@google.com, Apr 08, 2008
(No comment was entered for this change.)
Labels: Milestone-Planned
Comment 3 by knorton+personal@google.com, Apr 29, 2008
 
Owner: knorton
Comment 4 by br...@google.com, Oct 21, 2008
(No comment was entered for this change.)
Labels: -priority-medium
Comment 5 by g.paramelle, Jan 30, 2009
Still occurs in GWT 1.5
Comment 6 by g.paramelle, Jan 30, 2009
I forgot : reproduced with GWT 1.5 / Firefox 3
Comment 7 by t.broyer, 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()


Sign in to add a comment