GWT-Ext

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GWT-Ext

Postby jangel » Sun Jan 13, 2008 10:39 pm

Hello,

any experience using "GWT-Ext" widgets (http://code.google.com/p/gwt-ext/)?.

Widget constructors seems to be some arguments, and Designer complains about that.

Thanks a lot.

JAngel.
======
jangel
 
Posts: 1
Joined: Sun Jan 13, 2008 10:34 pm

Re: GWT-Ext

Postby Eric Clayberg » Mon Jan 14, 2008 5:49 am

See the GWT Designer FAQ...

GWT Designer has some limited support for gwt-ext. All standard GWT widgets work with GWT Designer as do any widgets that are JavaBean compliant (e.g., they include a public default constructor and expose properties via getter/setter pairs). Widgets that define their own API and don't conform to the JavaBean spec likely will not work as-is (which is the case with most of the gwt-ext widgets). You can wrapper the gwt-ext widgets in a Composite subclass in order to see them in GWT Designer (see the ImageViewer example in this project which shows a TabPanel within a Composite).

We do plan to eventually provide full support for the gwt-ext widgets, but it won't happen right away. GWT itself has only just come out of beta, and the gwt-ext widgets are still very much in beta (currently at v0.9.2). Until those widgets have been finalized and their API stablized, any support we added for them would be premature and likely a waste of our engineering resources.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT-Ext -- UPDATE

Postby jcmorris-mts » Wed Feb 06, 2008 12:23 pm

Eric,

Apparently, GWT-Ext 2.0 was released just today. See http://code.google.com/p/gwt-ext/. The widgets that it boasts are very impressive indeed -- I actually need many of them for a current project. I recently purchased a 1 year subscription to GWT-Designer and I was hoping that Instantiations would roll the GWT-Ext functionality into Designer fairly soon. Where is Instantiations at in terms of supporting GWT-Ext now?

Thanks!

Jason Morris
Morris Technical Solutions LLC
jcmorris-mts
 
Posts: 25
Joined: Wed Feb 06, 2008 12:16 pm

Re: GWT-Ext

Postby peterblazejewicz » Wed Feb 06, 2008 1:29 pm

hi Jason,
just little off post,
One could imagine that integration of 3rd party libs can be easy task only if constructors/getters/setters are avaialbe,
however that's not exactly everything, I'm writting my own ui lib in spare time and I'm amazed how differently 3rd party libs actually work under-the-hood from what I know from GWT toolkit implementation,
consider GWT-EXT way of adding widgets to Absolute panel (core GWT component):

Code: Select all
AbsolutePanel mainPanel = new AbsolutePanel();
// You must set the size of the panel for Firefox
mainPanel.setSize("100%", "75%");
// Render the field to the parent panel
dateField.render(mainPanel.getElement());
// Add the field to the panel at the specified location
mainPanel.add(dateField, 10, 10);

(taken from GWT-EXT group one of latest post)
that line:
Code: Select all
Component.render(element)

and many simliar are other implementation details which will put GWT Designer team into troubles I guess,
here (and the same is true for MyGWT) one can see how much Javascript implementation details influance people when writing java implementation (why isn't that implemented at least as Component.render(UIObject or Widget) or just hidden somehow in implementation details),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: GWT-Ext

Postby johns » Thu Feb 07, 2008 5:46 am

I'm trying to use the gwt-ext 2.0 TreePanel in GWT Designer. I'm getting a NoClassDefFoundError error when I use it. The TreePanel has a public zero argument constructor, so it should work shouldn't it?
johns
 
Posts: 5
Joined: Thu Feb 07, 2008 4:22 am

Re: GWT-Ext

Postby taxaw » Fri Feb 08, 2008 12:48 am

It would be very intersting for gwt designer to sign a partnership contract with the gwt-ext team in order to well integrate gwt-ext.
GWT-EXT is the best gwt UI i have ever seen and is well used and known now.
GWT-EXT 2.0 is bean compatible now.
So please let go ahead and make your tool very intersting with a real UI framework (not just gwt ui which are very basics !).
Thanks.
Sory for my english (wolof from senegal and french speeker)
taxaw
 
Posts: 6
Joined: Fri Feb 08, 2008 12:42 am

Re: GWT-Ext

Postby peterblazejewicz » Fri Feb 08, 2008 5:51 am

hi,
I think I know where the problem lies: GWT-EXT UI elements has default constructor (like in JavaBean) but they are not creating real "meat" of UI elelement which is created later e.g when widget is added to other element (so java port is reading underlying javascript ext widget element and its properties and expose it to java level),
I can read that from stack trace where GWT Designer Eclipse IDE integration wrappers are build to provide design time widget object for wyswig editor (Ext widget exists as object with properties without DOM integration unless attached a.k.a "rendered" I think),
For example there are static initializers in EXT java port but defautl constructors (and even paratemtrized ones) does not use javascript bridget to create widget at all).
I was trying to "view" Hello World usign Panel widget:
Code: Select all
/**
     * Create a new Panel.
     */
    public Panel() {
    }

    /**
     * Construct a new Panel with the given title.
     *
     * @param title the title
     */
    public Panel(String title) {
        setTitle(title);
    }

    public Panel(String title, String html) {
        setTitle(title);
        setHtml(html);
    }

    public Panel(String title, int width, int height) {
        setTitle(title);
        setWidth(width);
        setHeight(height);
    }

and unless I write my patch to gwt-ext implementation I cannot SEE it (code view and hosted mode work just fine),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: GWT-Ext

Postby sjivan » Fri Feb 08, 2008 9:19 am

Hi Peter,
You're right in that GWT-Ext components are lazily rendered to the DOM which means that when you instantiate a GWT-Ext Panel object, it is not physically rendered to the DOM. The getters and setters can be called at this point. This is done so to maximize the efficiency of use of widgets and when building larger UI's this can be a huge performance boost.

The actual rendering of all GWT-Ext Components takes place when the top level Container or Component is attached to the DOM. When this happens, all the child Components get rendered based on the layout manager used. A Container is also a Component so a top level Container can have child containers.

A Component can be attached to a DOM

- by calling ,say, RootPanel.get().add(panel); or
- by adding the GWT-Ext Component to any of GWT's standard panels like VerticalPanel / HorizontalPanel or
- explicitly calling the Component#render(Element element) method which renders to component to the passed element.

Essentially whenever a caller invokes getElement() on a Component, it it hasn't already been create and rendered, the underlying Ext component is instantiated and rendered to the browser DOM.

I hope this clarifies. I didn't quite follow the change in the patch you see making to get it work. Please let me know if there's any change you'd like to see to help GWT-Designer support of GWT-Ext.

Thanks,
Sanjiv

GWT-Ext Widget Library
http://www.gwt-ext.com
Last edited by sjivan on Fri Feb 08, 2008 10:17 am, edited 1 time in total.
sjivan
 
Posts: 9
Joined: Thu Feb 07, 2008 8:25 am
Location: Boston

Re: GWT-Ext

Postby robsmith » Fri Feb 08, 2008 10:16 am

I have a team of junior developers building an application using gwt-ext and we would definitely be interested in GWT Designer if it supports gwt-ext 2.0. Based on Peter's and Sanjiv's posts it seems like just having the noop constructor isn't enough.
robsmith
 
Posts: 1
Joined: Fri Feb 08, 2008 10:10 am

Re: GWT-Ext: Development & Integration Update

Postby jcmorris-mts » Fri Feb 08, 2008 3:10 pm

Hi All,

Much has changed since Eric's last post on this subject, and apparently many GWT Designer users are keen to run GWT-Ext in Designer.
Perhaps Eric will comment on where Instantiations is at regarding its integration of GWT-Ext. Any idea of when we can expect to see a point release or even a stable beta?

-JM
jcmorris-mts
 
Posts: 25
Joined: Wed Feb 06, 2008 12:16 pm

Re: GWT-Ext

Postby peterblazejewicz » Sat Feb 09, 2008 6:25 am

sjivan wrote:I didn't quite follow the change in the patch you see making to get it work. Please let me know if there's any change you'd like to see to help GWT-Designer support of GWT-Ext.

hi Sanjiv,
When I tried to use YUI widgets natively (like in GWT-EXT) in Design view I found that tricky becuase I had to fix widget element directly in constructor (via setElement(...) or initWidget(...)). I think that is related to GWT Designer implementation which creates real widget behind-the-scenes in hidden hosted mode to create screenshot of what is rendered and apply behaviors/properties/events to such created bean-ized widget for use in Design view.,

so for exampel quick hacky way to display e.g. Panel component:
Code: Select all
package com.mycompany.project.client;

import com.google.gwt.user.client.DOM;

import com.gwtext.client.widgets.Panel;

public class MyPanel extends Panel {
  public MyPanel() {
    super(DOM.createDiv());
  }
}


rendered:
Code: Select all
package com.mycompany.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TreeTest implements EntryPoint {
  public void onModuleLoad() {
    final RootPanel rootPanel = RootPanel.get();
    MyPanel mainPanel = new MyPanel();
    rootPanel.add(mainPanel);
    mainPanel.setTitle("My Panel");
  }

}

that does not generate errors and even shows bean properties, however that is not exactly what expected (try to run example codes to see what is missing and how it is rendered),

Assuming that GWT Designer team would write new implementation for loading GWT-EXT components for design view (maybe as pluggable extension which can be enabled/disabled in Designer properties per-project or per-workspace) there will be things which would be tricky to use in Design view,
Above sample uses Panel which I guess is container for other widgets, however it won't be supporting D&D components because of implementation based on javascript implementation but not GWT Toolkit implementation (in GWT toolkit we add components usign Panel subclasses which is supported in GWT Designer implementation). To allow D&D I had to subclass ComplexPanel or FlowPanel (or other derivates from Panel),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: GWT-Ext

Postby Eric Clayberg » Sun Feb 10, 2008 8:01 pm

We are looking at GWT-EXT 2.0 now. As of our latest build, several of the simple widgets work. We hope to get all of the widgets droppable on the canvas soon.

Keep in mind that any complex widgets and panels will require special design time support on our end. The is a significant ammount of work that will be scheduled over the next couple of months.
Attachments
gwt-ext.gif
GWT-EXT 2.0 widgets in GWT Designer
gwt-ext.gif (66.29 KiB) Viewed 20186 times
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT-Ext

Postby johns » Mon Feb 11, 2008 1:24 am

I've just tried adding the DatePicker to a page and I still get

Could not initialize class com.gwtext.client.widgets.DatePicker
....
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.gwtext.client.widgets.DatePicker

gwtext.jar is on my projects classpath, and I don't have anything marked as an error in source view. Could I have configured something wrong?

John
johns
 
Posts: 5
Joined: Thu Feb 07, 2008 4:22 am

Re: GWT-Ext

Postby Eric Clayberg » Mon Feb 11, 2008 3:16 am

johns wrote:I've just tried adding the DatePicker to a page and I still get
Could not initialize class com.gwtext.client.widgets.DatePicker
....
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.gwtext.client.widgets.DatePicker
gwtext.jar is on my projects classpath, and I don't have anything marked as an error in source view. Could I have configured something wrong?

You need to be using the latest GWT Designer build as stated in my prior post on this topic.

You appear to be using a build from last week that predates any work that we have done to support GWT-EXT 2.0.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT-Ext

Postby johns » Mon Feb 11, 2008 4:06 am

I upgraded to the latest version and I'm still getting the same error, here's the version info from the log message:

Product: GWT Designer Subscription
Version: 3.0.1.200802110030 [200802110030]
Expected: Eclipse 3.3
Actual: Eclipse 3.3.100.v20070530
Actual Eclipse Build Name:
Actual Eclipse Build ID: I20070621-1340
IDE Actual Name: Eclipse
IDE Actual Version: 3.3.0.v20070613
IDE Actual NL: en_GB

What am I missing?

Thanks, John
johns
 
Posts: 5
Joined: Thu Feb 07, 2008 4:22 am

Next

Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests