DropDown Menu

Here are my questions.

I want to add a custom drop-down menu in my application.
I’ve found some free css menus i like.
Right now i’m using a

Label menu = new Label(menuFile,Label.CONTENT_XHTML);

just to show the menu.
menuFile is just an html file that points to the css style files and contains the menu.
I can see the menu but what’s next?
Can I get in any way what the user clicks into my Vaadin code or am i forced to use the of the html file?
Is that the best tactic to use?
I’ve also seen the Vaadin MenuBar, it works fine, but I found it a little bit hard to change the looks of it.
Should i persevere in this way?

Thanks in advance,
Marios

You can’t use a plain HTML menu in Vaadin apps. In regular HTML, links open a new page, which violates the AJAX-based user interaction of Vaadin applications.

If you want to style the menu better, you could either:

  1. Build it from regular components, such as a HorizontalLayout/VerticalLayout and Buttons or NativeButtons.
  2. Use CustomLayout, which allows you to use HTML to build the layout, and then have placeholders for the Vaadin buttons that make the actual actions