2 Replies Latest reply on Aug 4, 2010 10:12 PM by Dajji

    Custom Data Descriptor for Tree

    Dajji Level 3

      Hey Experts,

       

      I am trying to create a custom data descriptor for Tree component in Flex 3 but it doesn't seem to work. I have a xml file with the structure shown below.

       

      <course>
           <block>
                <title><![CDATA[Introduction]]></title>
                <page source = "xml/block_1/p1.xml">
                     <title><![CDATA[Overview]]></title>
                </page>
                <page source = "xml/block_1/p2.xml">
                     <title><![CDATA[Features]]></title>
                </page>
                <block>
                     <title><![CDATA[Structures]]></title>
                     <page source = "xml/block_2/p1.xml">
                          <title><![CDATA[Structure 1]]></title>
                     </page>
                </block>
                <block>
                     <title><![CDATA[Samples]]></title>
                     <page source = "xml/block_3/p1.xml">
                          <title><![CDATA[Structures]]></title>
                     </page>
                </block>
           </block>
      </course>
      

       

      The block element will contain title of the block, pages and child blocks. This structure allow n levels of nesting. I would like to create a data descriptor class which will help create a tree menu with the title of the block or page and source as the data for page nodes. I tried creating a custom data descriptor class implementing ITreeDataDescriptor but it does not work.

       

      Can someone help me with that?