Pregunta

I got the class TopMenu which extends MenuBar vaadin component and I override method: addItem - this method is use to add items - now I got other class where I create

TopMenu topMenu = TopMenu();

and add as a component

addComponent(topMenu)

I need add listener to topMenu like:

topMenu.addListener(ClickListener...){...}

and get the item to change his styleName/layout

I can't use item command, thanks for help.

¿Fue útil?

Solución

Try this:

topMenu.addItemListener(...) //instead of addListener
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top