function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
profile_nameprofile_name 

Action Support behaviour in dynamic component.

I found that using action support in dynamic components is very troublesome and wonder if I am using the right approach to create my required output.:
Equipment_Type__c has a field called Parent_Type__c which is a lookup to itself, creating a parent-child relationship. The requirement is a set of SelectLists: at first, only one list is displayed, containing types which have no parent. When one of the types is selected,say type1, another list is displayed next to it, containing the types whose parent is type1. If one of the types on this list is selected, one more list is displayed, containing its children and so on.
The general approach I used, with dynamic component is from here:(ie. the idea was to create one dynamic component with each list as a child component of its parent)
        http://wiki.developerforce.com/page/Dynamic_Visualforce_Components
The main problem I encountered was with displaying/hiding each list: from what I've seen, it is not possible to change the 'Rendered' attribute of a component using a controller method. The only other option seems to be using ActionSupport. However, even this must be dynamic, and leaves me with having to do this(only a rough attempt):

            Component.Apex.ActionRegion ar = new Component.Apex.ActionRegion();
            Component.Apex.SelectList selList = new Component.Apex.SelectList ( size = 10,  id = 'sl1');   
            ar.childComponents.add(selList);              
            Component.Apex.ActionSupport asu = new Component.Apex.ActionSupport (event='onchange');         
            asu.expressions.action='{!processSelect}';
            asu.expressions.rerender=selectedItem;         
            selList.childComponents.add(asu);

Is there a better strategy to use? In general, what is the most efficient way to achieve the output that I described?