Dynamic menu

Hi folks,

I am newbie in Vaadin and I am trying to implement an application. My question is: How to create a menu, like a tree, dynamically? Well, I can retrieve the user authorizations and then generate the menu based in it. This is my idea, but the click event for each tree node, and how to set the resource name that must be accessed?

Please, could anyone help me?

I am grateful for any help. If you have an example, then…

Best regards,

Vitor Eduardo