Widget inside Tree

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

Widget inside Tree

Postby ashouric » Sat Nov 11, 2006 5:30 am

The designer doesn't parse the child widget:

Code: Select all
public class Hello extends Composite {

   public Hello() {
      final Tree tree = new Tree();
      initWidget(tree);
      final Label label = new Label("Hello there");
      tree.add( label );
   }

}
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Re: Widget inside Tree

Postby Eric Clayberg » Sun Nov 12, 2006 6:27 pm

Give this a try in the latest build.
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 Nov 13, 2006 8:57 am

Now it is parsed, but:


    1- It is added inside a 'null("")' TreeItem, may be the TreeItem should not be visible. Also, try to change TreeItem 'selected' property, you will have invalid code:
    Code: Select all
             final void void_ = tree.add( label );
             void_.setSelected(true);

    2 - It is not allowed to add an arbitrary widget into tree.
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Postby Konstantin.Scheglov » Wed Nov 15, 2006 9:19 pm

1. Yes, we should not add item in case of "add". But we should add item if "addItem" is used.

2. In latest version you can add widget to tree/items.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests