Skip navigation
Currently Being Moderated

Nested Menus Not Appearing in a Custom Panel Fly-out Menu

Sep 28, 2010 7:36 AM

I tried to create a menu for a custom panel, using the example which David Clark graciously pointed out to me:

http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/programmers_guide/cus tomizing_the_ui.htm

 

However, the nested menu items do not appear. I only see Item 1 and Item 2 (and the separator and Item 3), but not Item 2-1. I was expecting to see Item 2-1 nested under Item 2.

 

I used the menu structure provided in the example (note that there is an error in the example - one of the closing tags is incorrectly specified as "<MenuItem/>" instead of "</MenuItem>"). Below is the corrected XML and my code:

 

protected function createMenu():void

{

   var xmlMenu:XML =
    <Menu>
      <MenuItem Id="item_1" Label="Item 1"/>
      <MenuItem Label="Item 2">
        <MenuItem Label="Item 2-1"/>
      </MenuItem>
      <MenuItem Label="---"/>
      <MenuItem Label="Item 3"/>
     </Menu>;

 

    CSXSInterface.instance.addEventListener(MenuClickEvent.FLYOUT_MENU_CL ICK, menuClickHandler);
    var menuAdded:SyncRequestResult = CSXSInterface.getInstance().setPanelMenu(xmlMenu);
    if (SyncRequestResult.COMPLETE != menuAdded.status)
    {
     trace("Unable to add menu");
    }

}

 

   public function menuClickHandler(event:MenuClickEvent):void
   {
       switch (event.menuName) //you can also use the menuId
    {
    case "Item 1":
    trace("Item 1 has been clicked");
    break;
    default:
    trace("clicked " + event.menuName);
    }
   }

 

I'd appreciate it if somebody could tell me what I'm doing wrong.

 

TIA,

mlavie

 
Replies
  • Currently Being Moderated
    Sep 28, 2010 12:59 PM   in reply to mlavie

    At the moment, it appears to be a bug. I'm still researching, though.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 5, 2010 9:46 AM   in reply to mlavie

    Not really, I am filing a bug on it.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2012 12:52 AM   in reply to Bob Stucky

    I am also facing this problem that nested menu do not appear.Actually i have used CSXSLibrary-2.0-SDK-3.4 so can any one suggest solution?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2012 6:00 AM   in reply to nam1490

    Unless I'm mistaken I believe this is a bug in the documentation, and that nested menus are not in fact supported at all.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2012 10:07 PM   in reply to lomorgan

    Thnx a lot

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points