Expand Collapse on ILOG Elixir OrgChart
As promised during my MAX sessions (both Europe & US), we will try to post on this blog the examples that were developed for the conference. I started with the sample showing how to display Microsoft Project in Flex, then Damien posted his Google Calendar Reader in AIR, and today I release the ILOG Elixir OrgChart expand/collapse sample.
As explained during the session, this example is leveraging the ability to switch the OrgChart employee renderer by an alternate one. This alternate is just extending the default renderer and adding an expand/collapse button depending on the state of the employee. Then when clicking the button an action is triggered that is either adding back or filtering out the reports of the given employee in the collection that serves as data provider for the OrgChart.
The Flex Builder project is available here. I think it is pretty decently commented, so just have a look at the code if you want to know more how it works.
The result is shown below:
[click on the "plus" image to expand]