I have problem with change of tab panel layout by click event on buton located on that panel. The main idea is to have custom menu (new, open, del) on smal panel on every tab panel. When you click button, tab panel layout is change to form (for example). I don’t want use modal window or new window, just change the tab panel layout (content) to something else by button click.
Share
It, is wrong specified question – you should ask how to notify parent component.
Bellow you have two examples show how to achive your goals. This first implementation does what Jens Janssons suggest on vaadin forum, you pass the ClickListener to the second panel as a constructor parameter. Note that to be able to remove the component from the outer panel, you need both a reference to the outer panel and to the inner panel. In this example Kim Lappanen stored the references in class variables. Note that ther is actually used a HorizontalLayout for what you called your “panel”, you can change it.
Antoher example is to implement the ClickListener directly in the inner panel. In the buttonClick method, I just call getParent() (returns the out layout) and then removes itself from that layout.