Hello. I posted this to the JSF forums at the Sun Developer network, and
someone there recommended that I post it to this mailing list.
In JSF 1.2_04 FCS, OutputLinkRenderer.getRendersChildren() returns true,
and its encodeChildren(FacesContext,UIComponent) method renders all of
the OutputLink's children, but if any child does not render its own
children (OutputLink's grandchildren), then those grandchildren are
simply not rendered.
Here's the relevant snippet of code. The part in comments is not part of
OutputLinkRenderer, but represents what is usually present in that type
of method.
public void encodeChildren(FacesContext context, UIComponent
component) {
if (!component.isRendered())
return;
Iterator<UIComponent> kids = component.getChildren().iterator();
while (kids.hasNext()) {
UIComponent kid = kids.next();
kid.encodeBegin(context);
if (kid.getRendersChildren()) {
kid.encodeChildren(context);
}
/****
else {
renderChildrenOurself(context, kid.getChildren());
}
****/
kid.encodeEnd(context);
}
}
I can't understand why this is the case, and was wondering if anyone can
tell me if this is a bug, or if there was some reason for this atypical
behaviour?
- Mark Collette