1 Reply Latest reply on Nov 3, 2009 1:30 PM by paul.williams

    Passing VO's into custom MXML components

    rcanulla Level 1

      Hi there. I have a repeater that's dataProvider is an ArrayCollection. I want to pass the currentItem of the repeater( a VO ) into the custom component. Any thoughts on the best way to do this?

       

      Repeater

           <mx:VBox y="44" height="80%" width="80%">     
                <mx:Repeater id="listContainer" dataProvider="{queue}">
                     <views:QueueItemView   />
                </mx:Repeater>
           </mx:VBox>
      

       

      Custom Component

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="600" height="60">
           
           <mx:Script>
                <![CDATA[
                     import com.ryancanulla.dashboard.content.vo.QueueItemVO;
                     [Bindable] public var item:QueueItemVO = new QueueItemVO();
                ]]>
           </mx:Script>
           <mx:Text x="10" y="10" text="This is the Article Title" fontWeight="bold" fontSize="12" width="545"/>
           <mx:Text x="10" y="30" text="item date  |  category  |  source"/>
           <mx:HRule width="100%" />
           
      </mx:Canvas>