0 Replies Latest reply on Apr 26, 2010 4:05 AM by Ling's

    Flex menubar using data in arraycollection..?

    Ling's Level 1


               We have using menubar to data binding in arraycollection its not working child menu.


      <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()">
              <!-- Place non-visual elements (e.g., services, value objects) here -->
                  import mx.collections.ArrayCollection;
                  [Bindable] private var menuData:ArrayCollection = new ArrayCollection;
                  public function init():void {
                      var menuItem:MenuItemWithChildren = new MenuItemWithChildren( “Expense Tracker”, true, “top” );
                      menuItem.children.push( new MenuItem( “E-Expense”, true, “2″ ) );
                      menuItem.children.push( new MenuItemWithChildren( “Expense Drill”, true, “top” ) );
                      menuItem2.children.push( new MenuItem( “to Vendor”, true, “4″ ) );
                      menuItem2.children.push( new MenuItem( “to GL Account”, true, “5″ ) );
                      menuItem2.children.push( new MenuItem( “Departmental”, true, “6″ ) );
                      menuData.addItem( menuItem );
                      I extended the MenuItem and MenuItemWithChildren to take in optionally “data” defaulted to “top”…
              <mx:ApplicationControlBar id="acb">
                  <mx:MenuBar id="mb" dataProvider="{ menuData }" />






      any solution to solve this problem and

      any one give an example link...

      With Regards.,