Registering external Library in Panel

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

Registering external Library in Panel

Postby Timo » Mon Jan 08, 2007 1:04 am

Hi Folks,

how can i register the http://gwt-widget.sourceforge.net/ library into the panel? Using the jar containing the widgets is not fullfilling.

Thx for Info

Timo Schnölzer
Timo
 
Posts: 1
Joined: Sun Jan 07, 2007 8:45 am

Re: Registering external Library in Panel

Postby Eric Clayberg » Mon Jan 08, 2007 5:16 am

Timo wrote:how can i register the http://gwt-widget.sourceforge.net/ library into the panel? Using the jar containing the widgets is not fullfilling.

You aren't going to have much luck with that widget package at its current early stage of development.

The jar does not include a property JavaBean manifest (the included manifest.mf does not list any of the components), so the palette manager can't find any of the included widgets.

Taking a look at most of the widgets in the package, I see that most of them violate the basic JavaBean spec in any case, so they would not be usable in Designer (most of them are missing the required default constructor). A couple of the widgets (like SimpleCalcPanel, OptionList, etc.) can be used because they supply the required default constructor.

The basic problem with this collection is that it is still an early beta (v0.1.3) where they have focused on widget functionality and not on the details required to make it GUI builder friendly. The package has not been updated since early November, so I'm not sure what the future holds for that collection.

Since the source is provided, you can modify those widgets so that they play well with GWT Designer (and any future bean compliant GUI builder). Here's what needs to be added:

1) Default constructors for each widget

2) Getter/setter pairs for each property that should be set by the GUI builder

3) A manifest.mf file that lists each individual widget (a good example can be found with the Swing MIG Calendar package)
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

Postby ashouric » Mon Jan 08, 2007 8:39 am

If I may add to the discussion, I guess the problem is more than that. On adding widget for external jar, it is added, but gives compilation error that it can not be referenced.

I think it is currently required that all widgets should be under 'client' package, is there a way to use external ones?

Many thanks.
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Postby Eric Clayberg » Mon Jan 08, 2007 11:09 am

ashouric wrote:I think it is currently required that all widgets should be under 'client' package, is there a way to use external ones?

To use an external widget library you need to do the following:

1. add the jar to the class path of Java project as you always do in Eclipse

2. in GWT, only modules can provide client side widgets/logic, so you should inherit the widgets module. In the case of the "GWT Widget Library", add the following line to the ImageViewer.gwt.xml file:

Code: Select all
<inherits name="org.gwtwidgets.WidgetLibrary"/>
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


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests