PDA

View Full Version : [CLOSED] FormPanels in TabItems in Window



george9
2 Jul 2009, 12:35 PM
When two tabs are created in a Window, and a FormPanel with a TextField is placed into each, then (after the Window shows up, and the first tab is shown):
1. click on the second tab (to show it)
2. click on the first tab (to return to it)

Result: Firefox's Activity Indicator starts to animate (can't even be stopped with the Stop button)

web mode
gxt-2.0-rc2
Firefox 3.0.10
Linux 2.6.29



package com.test.client;

import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.Window;
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.layout.FormData;
import com.google.gwt.core.client.EntryPoint;

public class Test implements EntryPoint {

public void onModuleLoad() {

Window w = new Window();
w.setSize(400, 300);

TabPanel tp = new TabPanel();
w.add(tp);

TabItem t1 = new TabItem("tab 1");
TabItem t2 = new TabItem("tab 2");

tp.add(t1);
tp.add(t2);

FormPanel loginPanel = new FormPanel();
FormData loginPanelFD = new FormData();

TextField<String> email = new TextField<String>();
email.setFieldLabel("field 1");
email.setAllowBlank(false);
loginPanel.add(email, loginPanelFD);

t1.add(loginPanel);

FormPanel regPanel = new FormPanel();

/*FormData regPanelFD = new FormData();

TextField<String> fname = new TextField<String>();
fname.setFieldLabel("field 2");
fname.setAllowBlank(false);
regPanel.add(fname, regPanelFD);*/

t2.add(regPanel);

w.show();
}
}
(The TextField in second tab is commented out, as it was not necessary to exhibit the bug.)

sven
2 Jul 2009, 12:57 PM
This more looks like an issue in FF than in GXT. there are no files loaded on changing tabs.

george9
2 Jul 2009, 12:59 PM
I've now tested it in all major Browser versions on Windows XP, and it only applies to:

Firefox 3
Firefox 3.5

Firefox 2.0.0.20 and other browsers (IE, Opera, Safari, Chrome) are OK.


Firefox 2 has problem with displaying a checkbox in a form (field with no label, auto-width, checkbox has .setBoxLabel()), should I report that separately?

sven
2 Jul 2009, 1:04 PM
I am even able to reproduce a spinning of the loading without gxt and normal html. I am closing this issue. For some reason FF thinks it has to load something. It stops if it really has to load something and has finshed that.

I cant reproduce anything wrong with FF2 and checkboxes. Please post some proper testcase.

george9
2 Jul 2009, 1:06 PM
This more looks like an issue in FF than in GXT. there are no files loaded on changing tabs.

I've tried to isolate it, but the generated javascript is way too complex for me as a GWT newbie.

When the TabPanel is placed out of the Window, all is OK.