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.