In JSF2, how to know if composite component has children?
I'm writing a composite component, you have a special tag named: <composite:insertChildren /> Which inserts all the component's children there. Is there any way to know whether the component has children? Like a boolean value that could go on a "rendered" attribute. The basic expression you're after is the following: #{cc.childCount} or more elaborately: #{component.getCompositeComponentParent(component).childCount} E.g. the following composite component: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:cc="http://java.sun.com/jsf/composite" > <cc