Hello,
I am using com.google.gwt.widgetideas.client.FastTree from the incubator
project along with UiBinder.

I cant seem to add new FastTreeItem to the the tree object and see the
updated values in the view.


public class NavigatorView extends Composite implements INavigatorDisplay {
 public interface NavigatorViewBinder extends UiBinder<ScrollPanel,
NavigatorView>{
 }
 private NavigatorViewBinder binder=GWT.create(NavigatorViewBinder.class);
 @UiField
HTMLPanel errorHtml;
 @UiField
DecoratorPanel navMainPanel;
@UiField
HTMLPanel navTreePanel;
@UiField
FastTree navTree;
 public NavigatorView() {
 FastTree.addDefaultCSS();
initWidget(binder.createAndBindUi(this));
navMainPanel.setWidth("100%");
errorHtml.getElement().setId("navError");
navTreePanel.getElement().setId("navTreePanelx");
  FastTreeItem item1=new NavTreeItem(1,"1st ");
FastTreeItem item11=new NavTreeItem(11,"2nd ");
item1.addItem(item11);
 FastTreeItem item2=new NavTreeItem(2,"level 2");
 FastTreeItem item21=new NavTreeItem(21,"level 21");
item2.addItem(item21);
 FastTreeItem item22=new NavTreeItem(22,"level 22");
item2.addItem(item22);
  navTree.addItem(item1);
navTree.getItem(0).addItem(item2);
navTree.addItem("Top level one");
navTree.getItem(1).addItem("top ane next");
 final FastTreeItem item4=new NavTreeItem(4,new TreeNodeWidget(4));
navTree.addItem(item4);
navTree.getItem(2).addItem(new NavTreeItem(5,new TreeNodeWidget(5)));
//navTree.addItem(item3);
}
  public void setNavigatorData(String status) {
GWT.log("Settings data on view."+this.navTree.getChildCount());
 *navTree.addItem("2nd Top level one");//these are not shown in the tree.*
* **navTree.getItem(1).addItem("top and another  next");*

GWT.log("Settings data on view."+this.navTree.getChildCount());
 }

}

The items added in setNavigationData are not show up in the tree. I am using
Mvp4g. What am i doing wrong? After adding the items to the tree is there
something else also i need to do to see the new values in the tree?

Thanks a lot in advance.

Subhro.

-- 
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-tool...@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