There is no actual TreeNode class. Trees can be constructed from objects of any class as long as they implement the interface described here.
When using lazy loaded trees this member should be initialised to an empty list in the constructor. The presence of the children member makes the toolkit treat the node as a non-leaf node.
0
in the node constructor. The toolkit will set
the member to 1
once it has called the load_children()
method of the node.
ctx) |
The toolkit will call this method when it needs to display the child
nodes of a node and they have not yet been loaded
(children_loaded == 0
).
The toolkit ``knows'' when it needs to see the child nodes of a particular node so it asks that node to load the children. This allows potentially huge trees to be browsed by having the toolkit only load those nodes that are visible.
) |
str(id(self))
will not work).
The TreeIterator uses the node identifier to record which nodes are open and which are selected. The same identifier is also used when the node is referenced via an alias (5.2.2.1) attribute of an <al-input> tag.