PDA

View Full Version : General Usage of EXT GWT libraries



khalife
18 Feb 2009, 12:52 AM
Hi,
I would like to know the general use of these libraries, is it used client side by java applet or server side for producing HTML pages?
I installed the EXT GWT to my project using eclipse and I wrote the following code in a new class:
public static void main(String[] args) {
LayoutContainer container = new LayoutContainer();
container.add(new Button("Click Me"));
container.setSize(300, 300);
container.setBorders(true);
RootPanel.get().add(container);

or this code
Html htm = new Html("");

htm.setTitle("title ali");
htm.setToolTip("tool tip di prova");
String text = htm.getHtml();
text = text+"";

}

while debugging I got the following error.
Exception in thread "main" java.lang.ExceptionInInitializerError
at ExtGWT.main(ExtGWT.java:10)
Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is only usable in client code! It cannot be called, for example, from server code. If you are running a unit test, check that your test case extends GWTTestCase and that GWT.create() is not called from within an initializer or constructor.
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.google.gwt.user.client.ui.UIObject.<clinit>(UIObject.java:139)
... 1 more



Any one can help me please?
Thanks

sdc
18 Feb 2009, 3:04 AM
Hi,

Ext GWT is based on GWT which translates Java to Javascript. Look at http://code.google.com/intl/en/webtoolkit/
Ext GWT adds widgets, layouts, MVC and other important missing features to GWT.

sdc
18 Feb 2009, 4:36 AM
Or you can try here to begin : http://extjs.com/helpcenter/index.jsp

khalife
18 Feb 2009, 5:58 AM
Thanks. ;)