No GUI roots detected after changing parent class

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

No GUI roots detected after changing parent class

Postby nopalot » Fri Mar 14, 2008 1:10 pm

Hello,

after changing the parent of a custom widget from Composite to SimplePanel or FlexTable, GWT designer (Build 14.03.2008) complains that it was unable to find any GUI elements in my source. If it happens, then theres no entry in eclipse error log view. Is this an intended behavior?
nopalot
 
Posts: 11
Joined: Fri Jul 27, 2007 1:19 pm

Re: No GUI roots detected after changing parent class

Postby Eric Clayberg » Fri Mar 14, 2008 2:24 pm

nopalot wrote:after changing the parent of a custom widget from Composite to SimplePanel or FlexTable, GWT designer (Build 14.03.2008) complains that it was unable to find any GUI elements in my source. If it happens, then theres no entry in eclipse error log view. Is this an intended behavior?

Custom widgets should be subclassed from Composite; not from one of the Panel types. See...

http://code.google.com/webtoolkit/docum ... tomWidgets

GWT Designer can visually edit Composites, EntryPoints, DialogBoxes and PopupPanels. The tool does not allow visual editing of widget or panel classes (those can be used within editable GUI classes).
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: No GUI roots detected after changing parent class

Postby nopalot » Sat Mar 15, 2008 8:56 am

Hi Eric,

thanks for the info.
Nop.
nopalot
 
Posts: 11
Joined: Fri Jul 27, 2007 1:19 pm

Re: No GUI roots detected after changing parent class

Postby peterblazejewicz » Sat Mar 15, 2008 3:37 pm

nopalot wrote:Hello,

after changing the parent of a custom widget from Composite to SimplePanel or FlexTable, GWT designer (Build 14.03.2008) complains that it was unable to find any GUI elements in my source. If it happens, then theres no entry in eclipse error log view. Is this an intended behavior?

hi,
changing parent its not enough, construction of object is different in composite and in direct subclassing. You have to implement default constructor for GWTD which at least builds all required functionality of super class if not calling super() in it. Also subclassing GWT ui widget can be tricky becuase some fields and constructors are not directly avialable for subclassing ;(.

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

Re: No GUI roots detected after changing parent class

Postby Eric Clayberg » Tue Mar 18, 2008 9:25 pm

For most user, subclassing Composite is the best way to go as suggested by Google.

Using GWT Designer's Composite wizard is an easy way to get started with this.
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: No GUI roots detected after changing parent class

Postby eivenchan » Mon Apr 07, 2008 5:47 pm

But use the Composite subclass, i can't use any method to find it's instance which like Panel's "findByID()" method.
Any advice?
eivenchan
 
Posts: 9
Joined: Tue Mar 25, 2008 5:24 pm

Re: No GUI roots detected after changing parent class

Postby Eric Clayberg » Tue Apr 08, 2008 4:19 am

eivenchan wrote:But use the Composite subclass, i can't use any method to find it's instance which like Panel's "findByID()" method.
Any advice?

I honestly have no idea what you are trying to do or what the problem might be.

I don't even see a "findByID()" method in Panel.
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