This content has been marked as final. Show 5 replies
The getChildren () method returns a list of UIComponent, so to remove an element from a list you have to use the index of the element in the list. Using the component ID won't work.
You can remove the element from the list using the element itself, meaning you have the inputFile component as a reference, you can use getChildren().remove(ref_inputfile);
Or you can iterate over the child elements to get the index of the component to remove.
Have you tried refreshing the container of the component after removing the component ?
As Timo said you wont be able to remove the component using ID.
if you have
RichInputFile if_test = new RichInputFile();try removing by getChildren().remove(if_test); and after that refresh the container containing that component.