-1

I am new to GWT. I have a CellTree on the left hand side consisting of three hierachies namely - session, uproc and batch. I have three Composite Widgets in the center, one for each Session, Uproc and Batch for displaying its details. In the UiBinder of these widgets, I have FormPanel which will display the data.

I want that when I click on the Session Node of the tree, my Session formPanel widget should be filled with session data and the visibility of the uproc and batch panels should be set to false.

Likewise, when I click on the Uproc Node,Session and Uproc Panel should be filled with data (uproc is child of Session), but fields in session panel should be disabled and the batch panel should be disabled.

Likewise, when I click on the Batch Node,Session and Uproc Panel should be filled with data (batch is child of uproc), but fields in session and uproc panel should be disabled and the batch panel should be filled with the data of the selected batch.

Please let me know how to go about implementing this scenario. I am using gwt 2.4. Thanks

  • I don't think StackOverflow is the place to ask for tutorials for a specific use case. Your question should be relevant to others (see http://stackoverflow.com/questions/how-to-ask). If you need information on how to use a GWT CellTree, a simple search on google will give you good links like http://stackoverflow.com/q/4396459/405492 or http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTree – jonasr Jun 14 '12 at 12:51

1 Answers1

0

You have to a SelectionModel to your CellTree widget and a SelectionChangeHandler to it. You have to add the SelectionModel to the DefaultNodeInfo constructor of each level for which you want to have interaction.
In the SelectionChangeHandler callback you can then change the center panel.

Check out the Showcase CellTree example for how to do it.

Ümit
  • 17,379
  • 7
  • 55
  • 74