Fun and frustration while working with Flex Tree
I had a play with the Flex tree. Some key learnings:
- Whenever you are setting the dataProvider attribute of the tree
tag, make sure to plug the curly brackets around the dataprovider
source name. So, "{myDataProvider}", rather than simply
"myDataProvider"
- Events handlers: When you use the standard "nodeOpen" and
"nodeClose" event handlers, and pass the event to the function that
handles the event, the information about the node is available in
"event.node". So to retrieve the "label" attribute of the node,
you'd go: "event.node.label".
- However, if you use "cellPress" or
other such event handlers, the information about the node is
available in "event.target.selectedItem". This makes available a
node, which you can then query by using the getProperty() method.
So, for the same "label" property, you'd have to go
"event.target.selectedItem.getProperty('label')"
Will add more learnings as I go along.
Comments
There are no comments for this page as yet.
print page
