Cannot initialize GWT-Ext Widget

I’m able to initialize a GWT Widget by extending a Vaadin Component to it. But when I do the same with GWT-Ext Widgets my page comes blank. I’ve no errors or warnings during compilation(checked with verbose compilation output).

For better understanding of the problem, I’ve posted both of my codes.
This is my code that I wrote for GWT Widgets:

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class ColumnGroupingExample extends Composite {
	public ColumnGroupingExample() {
		super();
		VerticalPanel vp = new VerticalPanel();
		vp.setTitle("GWT title");
		vp.add(new CheckBox());
		vp.add(new Label("GWT Label"));
		vp.add(new Button("GWT button"));
		initWidget(vp);
	}
}
<module>
	<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
    <set-property name="user.agent" value="gecko"/>
</module>
public class VColumnGroupingWidget extends ColumnGroupingExample implements Paintable

@ClientWidget(VColumnGroupingWidget.class) public class ColumnGroupingWidget extends AbstractComponent I get the desired result for the above code.

But when i change the widgets from
com.google.gwt.user.client.ui.*
to
com.extjs.gxt.ui.client.widget.*
then I get a blank browser screen as output. Here is the code:

import com.extjs.gxt.ui.client.widget.Label;
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.CheckBox;
import com.google.gwt.user.client.ui.Composite;

public class ColumnGroupingExample extends Composite {
	public ColumnGroupingExample() {
		super();
		VerticalPanel vp = new VerticalPanel();
		vp.setTitle("GWT-Ext title");
		vp.add(new CheckBox());
		vp.add(new Label("GWT-Ext Label"));
		vp.add(new Button("GWT-Ext button"));
		initWidget(vp);
	}
}
<module>
	<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
	[b]
<inherits name='com.extjs.gxt.ui.GXT'/>
[/b]

    <set-property name="user.agent" value="gecko"/>
</module>

I even tried to add some Vaadin components directly in the main window along with the Widget. Still no luck. The output is blank.

public class ColumngroupingexampleApplication extends Application {
	private static final long serialVersionUID = 1L;

	public void init() {
		Window mainWindow = new Window("Columngroupingexample Application");
		mainWindow.addComponent(new Button("A Vaadin Button"));
		mainWindow.addComponent(new DateField("Vaadin Date Field", new Date()));
		[b]
ColumnGroupingWidget widget1 = new ColumnGroupingWidget();
		mainWindow.addComponent(widget1);
[/b]
		mainWindow.addComponent(new Label("Vaadin label"));
		mainWindow.addComponent(new CheckBox("Vaadin Checkbox"));
		setMainWindow(mainWindow);
	}
}

I’ve included ext.jar in my classpath and I’m using eclipse. My class hierarchy is also correct.
I also tried the same with GWT-Mosaic library. Got the same problem.
Can anybody identify when am I going wrong?

Thanks in Advance.
11291.jpg

A blank window could mean that there is a javascript exception which halts the rendering. Try using Firebug or open the debug window (append ?debug to the url) and see if there are errors.

Thanks Artur Signell. A javascript exception halts the rendering…[quote=Artur Signell]
A blank window could mean that there is a javascript exception which halts the rendering. Try using Firebug or open the debug window (append ?debug to the url) and see if there are errors.
[/quote]I checked out Firefox’s Error console. There is one error saying:
[b]
No elements Found
for(;;);[{“changes”:
, “meta” : {}, “resources” : {}, “locales”:}]

[/b]
How can I avoid this problem?

Hi,

Does it work if you keep all the GXT stuff, but don’t add the custom component? I.e remove
ColumnGroupingWidget widget1 = new ColumnGroupingWidget(); mainWindow.addComponent(widget1);

The point: does GXT break something very core, or is it the actual component that breaks the app?

Best Regards,
Marc

Yes, Sure it works…

I’m getting an AttachDetachException. How can i avoid this?

You are not giving us much information to work with. AttachDetachException can probably be thrown for a various of reasons. One way to find out is to use the GWT Development mode so you are able to set breakpoints and see what happens also in the client side code.