PDA

View Full Version : [FIXED] [2.0.1]FormPanel opens new window in IE7 when submitted



wombatkin
23 Jul 2009, 2:06 PM
Hello,

I've found strange behaviour when using FormPanel.submit() method. When form is submitted, browser opens a new window. This only happens when using IE7 (running on WinXP sp3) in both modes, in FF and chrome code works fine.

Here is sample code:



package tests.client;

import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.form.FormPanel.Method;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class Test implements EntryPoint {
public void onModuleLoad() {
VerticalPanel root = new VerticalPanel();

final FormPanel form = new FormPanel();

TextField<String> myField = new TextField<String>();
myField.setFieldLabel("Test field");
myField.setName("my-field");

form.add(myField);
form.setAction("/test/blank.html");
form.setMethod(Method.POST);

root.add(form);

Button btn = new Button("Submit on event");
btn.addListener(Events.Select, new Listener<ButtonEvent>(){
@Override
public void handleEvent(ButtonEvent be) {
form.submit();
}
});

root.add(btn);

RootPanel.get("entryPoint").add(root);
}
}


In GXT 2.0 this code wroks fine. Is this a bug or I'm doing the wrong things?

Thanks.

sven
23 Jul 2009, 2:07 PM
This is already fixed in SVN. Please use the forum search before opening new topics in the bug forum. I am closing this issue.

ngrant
25 Aug 2009, 8:05 AM
I've searched all over the forum, and I can only see your comments about the issue being a duplicate.

Where can I find details for the fix, please.

Arno.Nyhm
26 Aug 2009, 4:46 AM
he fix is in the svn. you need support options to have access to svn or you have to wait until next 2.0.2 release...