7 Replies Latest reply on Jan 4, 2011 1:34 AM by jujhimup

    populating menubar from service (returning an arraycollection)

    jujhimup

      Hi,

       

      i am trying to populate a menubar component from a database, being called by a service.

      i can get as far as populating the menubar items - but they all print as '[object VOMenu]'.

       

      How do i go about making the menubar control display the title/label instead of that above? i also need these to link to pages, or somewhere (defined in the database).

       

      for info, here is the code:

      <s:controlBarContent>
                <mx:MenuBar dataProvider="{getMenuResult.lastResult}" id="menuBar" creationComplete="menuBar_creationCompleteHandler(event)"/>
           </s:controlBarContent>
      

       

      protected function menuBar_creationCompleteHandler(event:FlexEvent):void
                     {
                          getMenuResult.token = menu.getMenu();
                     }
      

       

       

      im sure its something simple and easy, but i cant figure it out and a few google searches doesnt seem to shed any light on using dynamic arraycollections from services (all examples hardcode define them within actionscript code, it seems)

       

      cheers,

      J