Hallo,
to find UICs from managed bean I use this simple function that till now had always worked well...
public static UIComponent findComponent(final String id) {
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot root = context.getViewRoot();
final UIComponent\[\] found = new UIComponent\[1\];
root.visitTree(new FullVisitContext(context), new VisitCallback() {
@Override
public VisitResult visit(VisitContext context, UIComponent component) {
if (component.getId().equals(id)) {
found\[0\] = component;
return VisitResult.COMPLETE;
}
return VisitResult.ACCEPT;
}
});
return found\[0\];
}
Now I have a situation in which it doesn't work.
In my view scoped managed bean I need to find the af:table "TT" in the jspx page associated with the bean. The af:table is inside a popup as you can see here...

The function works well with every UIC of the page, including popups, but returns null when called to find "TT"...
RichTable table = (RichTable) FacesUtils.findComponent("TT");
Do you have any idea of this strange phenomenon?
Thanks,
Federico