Trying to copy and paste the most basic celltree example:
http://code.google.com/intl/it-IT/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#celltree

But it only shows two blocks, without tree look and feel. Here's my
code:

public class CategorieTreeViewModel implements TreeViewModel {

        @Override
        public <T> NodeInfo<?> getNodeInfo(T value) {
                ListDataProvider<String> dataProvider = new
ListDataProvider<String>();
                for (int i = 0; i < 2; i++) {
                    dataProvider.getList().add(value + "." + String.valueOf(i));
                  }

                  // Return a node info that pairs the data with a cell.
                  return new DefaultNodeInfo<String>(dataProvider, new 
TextCell());
        }

        @Override
        public boolean isLeaf(Object value) {
                // The maximum length of a value is ten characters.
              return value.toString().length() > 10;
        }
}


public class Categorie extends Composite implements Constructable {

        private static CategorieUiBinder uiBinder =
GWT.create(CategorieUiBinder.class);
        interface CategorieUiBinder extends UiBinder<Widget, Categorie> {}

        @UiField(provided=true)
        CellTree cellTree;

        public Categorie() {

                // Create a model for the tree.
            TreeViewModel model = new CategorieTreeViewModel();

            // Create the tree using the model. We specify the default value
of the
            // hidden root node as "Item 1".
            cellTree = new CellTree(model, "Elemento 1");


                initWidget(uiBinder.createAndBindUi(this));
        }
}


Is there something wrong? What do you think?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to