Problem with removing children of the component
Hello,
Is it correct that i can remove only elements which are created dynamically (they are not present in xhtml)?
Example:
1. Icannot remove children of the component which are present in xhtml file
<h:form id="form">
...
<h:panelGroup binding="#{bean.panelGroup}" id="panel">
<h:outputText value="something" id="text"></h:outputText>
</h:panelGroup>
</h:form>
inside some action of the bean:
UIComponent ot = FacesContext.getCurrentInstance().getViewRoot().findComponent("form:text");
panelGroup.getChildren().remove(ot);// does not work
// ot is still displayed regardless that getChildCout() is 0
2. Ican remove a child which is created dynamically
HtmlOutputText ot2 =new HtmlOutputText();
ot2.setValue("new text");
ot2.setId("tttt");
panelGroup.getChildren().add(ot2);
//now ot2 is displayed
....
panelGroup.getChildren().remove(ot2);// it works
//ot2 will not be displayed;

