O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a basic tree

The TreePanel class provides the API for working with trees in GXT, and it works much the same way as other store-based components. Once its TreeStore instance is populated with data and the TreePanel instance is attached to the DOM, we are ready to view the hierarchy of nodes that can either be a parent or a leaf.

The hierarchy of nodes is rendered as highlightable (setTrackMouseOver()) and clickable items, labelled either by passing a property name in the model (from the TreeStore instance) to the setDisplayProperty() method of the tree, or by passing a ModelStringProvider implementation to the setLabelProvider() method of the tree.

How to do it...

Besides the other things to enhance the comprehension of the code, we basically ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required