0 Replies Latest reply on Jun 15, 2009 12:57 PM by postwick

    Dynamic Accordion with nested repeater


      How do I make a dynamic Accordion from two "tree structured" tables in SQL Server?  I have two tables, one that stores a list of the Accordion headers, and one that stores a list of the Buttons I want to put under each header.  Here is the code I have:


              <mx:Repeater id="myrepeater" dataProvider="{navheaders.getnav.lastResult}">
                      <mx:VBox label="{myrepeater.currentItem.NAVHEADERNAME}" >
                          <mx:Repeater id="buttons" dataProvider="{navheaders.getlinks.lastResult}">
                              <mx:Button label="{buttons.currentItem.NAVLINKNAME}"  />




      Currently there are two rows in navheaders.getnav so I end up with the Accordion created correctly.  However, none of the child elements from the second repeater are created.  If I un-nest the second repeater it works fine - so I know it is returning the correct data.  However, when it is nested, it doesn't create the Buttons.


      For now, I'm not worried about filtering the second repeater so the right Buttons are created under the right header, for now I'd be happy if I could just get the nested repeater to actually create the buttons.


      I read something about the way Accordions are created, that the whole thing isn't created - the sub-portions aren't created until that header is expanded.  I tried creationPolicy="all" and it had no effect.