Updating style with Navigator?


So I am using Vaadin as a framework in my java web application. In my application I have a menu that allows the user to navigate on the website, some elements on the menu have submenus that get highlighted when you click on them. I am having a small styling problem when I navigate between menus, say I am performing an action on menu A, so menu A is being highlighted, from menu A I have an action button that leads me to another menu B using the method navigateTo() of navigator. However, the style does not update to highlight the new menu.[essay writer]

Could you please help me with this? Thanks in advance.