1 Reply Latest reply on Apr 26, 2010 10:09 AM by Flex harUI

    Menubar with arraycollection..?

    Ling's Level 1


               I am using menubar to data binding in arraycollection its not working menubar


      <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()">
                  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.,