I am looking for sample code to create a dynamic Tree control in Flex using a Collection of objects obtained from the backend(Perl c开发者_StackOverflow中文版gi).
So, initially the Tree will display the root nodes. Clicking root node, will invoke the data for populating the child nodes (basically adding child nodes on demand). Clicking child nodes will pull another collection add child nodes of child node.
So, lets assume Initially the Tree will display -
Root1 Root2 Root3Clicking Root1 will display something like this -
Root1
Child 1 Child 2 Root2 Root3And Clicking Child1 will display -
Root1
Child 1 Child1 of Child 1 Child2 of Child 1 Child 2 Root2 Root3Is it possible?
Thanks in advance...
The standard Flex tree control does this.
You can use the itemOpen event to communicate with the back-end.
精彩评论