So, the thing is to make the NodeInfo for your leaf use a different Cell than the other non-leaf nodes. In the Showcase sample, in ContactTreeViewModel, notice how the getNodeInfo tests the type of the parent value (either 'null' denoting the root node, or a Category node, or a LetterCount node) to choose how to build the DefaultNodeInfo to be returned (children of the root node are categories, rendered using the CategoryCell; children of a category are letter-counts, rendered using a LetterCountCell; etc.)
Finally, the cell used to render individual contacts (leaf nodes), is built in the ContactTreeViewModel's constructor, as a CompositeCell composed of a CheckboxCell and a ContactCell; with the CompositeCell itself using some custom rendering to put each "sub-cell" into a table cell ("td" element within a <table><tr>)
Does it help?
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MNqNPRAhV1kJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment