1 Reply Latest reply on Feb 5, 2010 3:02 PM by Woodifer01

    Populate an accordian from a dataProvider

    Woodifer01

      I want to create an accordian that is populated from an xml news feed.  I just need the title and post from the news feed.  What is the best way to create the accordian with this informatio?

        • 1. Re: Populate an accordian from a dataProvider
          Woodifer01 Level 1

          I figured this one out.  Here is my code in case anyone need it:

           

           

          <mx:Accordion id="accordian" width="100%" bottom="25" top="0">
                 <mx:Repeater id="repeat"  dataProvider="{newsFeed}">
                      <mx:VBox width="100%" label="{repeat.currentItem.title}">
                           <mx:TextArea htmlText="{repeat.currentItem.description}" width="100%" wordWrap="true" borderStyle="none" horizontalScrollPolicy="off" verticalScrollPolicy="off"/>
                     </mx:VBox>    
               </mx:Repeater>

          </mx:Accordion>

           

          I did not know about the Repeater component.  It was the key to doing this