Data Model Flex


    height="400">
    
        
        import mx.collections.XMLListCollection;
        import mx.collections.ArrayCollection;
        [Bindable]
        public var myData:XML=
        
            
                
                
                
            
        
;
        
        [Bindable]
        public var listDP:XMLListCollection = new XMLListCollection(new XMLList());
        
        private function doTreeSelect():void
        {
            if (prodTree.selectedItem)
                listDP.addItem(prodTree.selectedItem.copy());
        }
        private function doListRemove():void
        {
            if (prodList.selectedItem)
                listDP.removeItemAt(prodList.selectedIndex);
        }