This time something easy:). I was preparing new navigation using the GWT TreeView widget and as usual I wanted to share some of my experience with you. Basically everything works just by design, so here the three steps of creation.
First step: you have to create your cell tree model. This is in my case just the class with the name of the node and his sub nodes. I call the class CellTreeDAOModel.
Second step: create your cell tree composer. The composer contains your cell tree mode. In my case this is the CellTreeModelComposer.
Third step: create your tree view mode. Here you set up the nodes and define how all those nodes has be rendered:
The function getNodeInfo from the TreeViewModel interface is the most important. You define into it how your tree will render the content.
If you want to use now together with UiBinding you have to define your UiField with the property provided set to true like this:
and then inside your constructor you can use this:
Don’t forget to put also the tree declaration inside your UiBinder XML file: