View Full Version : JScript error when nesting containers with FormLayout in IE - Why? Simple source...

15 Sep 2011, 2:54 AM
Simple source that you can add anywhere and just try to show/add this form. You should see JavaScriptException in GWT Development mode. I did not try it on apache because I need this also in dev mode.


import com.extjs.gxt.ui.client.data.BaseModel;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;

public class AATestWindow extends FormPanel

public AATestWindow()
setLayout(new FormLayout());
setSize(400, 200);


private LayoutContainer getComboLayout()
LayoutContainer mainLayout = new LayoutContainer();
mainLayout.setLayout(new ColumnLayout());

LayoutContainer childLayout = new LayoutContainer();
childLayout.setLayout(new FormLayout());

ComboBox<BaseModel> comboArea = new ComboBox<BaseModel>();
comboArea.setStore(new ListStore<BaseModel>());

mainLayout.add(childLayout, new ColumnData(.5));

return mainLayout;

The problem is when I assign new FormLayout() to childLayout. As it is, it produces above mentioned error. But, if I change that layout to say ColumnLayout, it is OK. Or if I bring FormLayout from the class constructor, it is also OK (though, no combo box is visible on the container then).

And as I said, IE only. FF was OK (thouhg I have to revert back to pre v6 to test it again).

Any thoughts? What did I mess up? :D

15 Sep 2011, 3:13 AM
The source code works fine for me. Is it possible that you add the AATestWindow into another FormPanel? That does not work in IE because you cannot nest one form tag into another (which also does not make much sense to do)

15 Sep 2011, 5:13 AM
I've checked for that earlier as I do get "Imvalid source HTML for this operation" description but no. One panel is form panel. I add this panel to different containers and finally to window.

I'll do some more digging.


15 Sep 2011, 9:22 PM
Update: Sven, thank you, you were correct. There was a small Form being added to one other form. Like I said, must have been something I did :>