Getting menus from a menubar

Hi,

I wonder if anybody knows if it is possible to get a list/Array of menus from a MenuBar?

I am trying to use menus in a MVC approach and so I have a View that holds the MenuBar instance and contructs it. Then a Presenter for handling the click events.

After I have initialised the view and presenter I call presenter.bind() and in this method I want to set the MenuItemClickHandler on each of the MenuItems that are held in the Menus’s of my MenuBar.

Is this approach possible or do you have to set the handler to the MenuItem before you set it into the Menu?

Regards,

Chris

You currently have to set the handler before providing it to the MenuBar.

We’d recommend looking at the code necessary to complete this before and after applying the pattern you’re trying to apply - there may simply be more code, but no new capabilities.