I am building a Tree component which has checkbox in it. Well I will explain it clearly. Say myTree consists of Branches like US, India and Sub-branches like California,Washington and Delhi, Bangalore respectively. All the branches and sub-brances will have checkboxes beside them and all these are created dynamically using ArrayCollection.
Now my requirement is if the checkbox of main branch is checked, all the check boxes of sub-branches should be checked automatically. For Example: If the checkbox of US is checked, the checkboxes of sub-branches corresponding to US i.e., California and Washington should also be checked. And if we remove the checkbox of main branch, all the checkboxes corresponding to that branch should be removed.
And another condition is if the checkbox of one of the sub branches is clicked, other checks should disappear. For Example: If I click India, both Delhi and Bangalore will be checked. Now if I click on Bangalore, the check should be at Bangalore only. The checks at Delhi and India should disappear.
Can someone help me in this respect.
Thanks in advance,
Nirmal Kumar Bhogadi