my english isn't very good.
I use JDeveloper 184.108.40.206.0
I create an InputFile component dynamically in a bean.
RichInputFile if_test = new RichInputFile();
but sometimes I should remove this component .How can I remove InputFile dynamically.
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.
I write follow code:
List<UIComponent> result = (List)new ArrayList<UIComponent>();
result = pgl10.getChildren();
int index = result.indexOf(ComponentID);
then to remove a component,I use two ways but none of them don't work: