You can use the code snippet for finding child component under parent component in ADF Faces.
Import the following Classes
Thanks
public static FacesContext getFacesContext() {
return FacesContext.getCurrentInstance();
}
public static UIComponent getChildUIComponent(String ParentUI, String ChildUI) {
UIComponent parentUI = getFacesContext().getViewRoot().findComponent(ParentUI);
UIComponent childUI = null;
UIComponent tempUI = null;
Iterator childrens = parentUI.getFacetsAndChildren();
while (childrens.hasNext()) {
tempUI = (UIComponent)childrens.next();
if (ChildUI.equals(tempUI.getId())) {
childUI = tempUI;
break;
}
}
return childUI;
}
Import the following Classes
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
Thanks
аФФтар пиши исЧо
ReplyDelete