In the Vaadin framework (v7.1.9), how do we remove a Component
from it's parent?
I'm only aware of the removeComponent
function, but that requires me to get a handle on the parent (ugly):
ComponentContainer parent = (ComponentContainer) child.getParent();
parent.removeComponent(child);
I tried to just detach
the child but that removed it from the 'application' without removing the Component
from the UI.
if Child is added to Any Layout you should cast it to that layout e.g if child ws added to AbsoluteLayout then
AbsoluteLayout parent = (AbsoluteLayout ) child.getParent();
parent.removeComponent(child);
Try this one