Suppose it has an extremely simple composite component:
<cc:implementation>
</cc:implementation>
Bean for him:
public class TestBean {
private boolean someField = false;
public boolean getSomeField() { return someField; }
@PostConstruct
public void init() {
System.out.println("PostConstruct");
}
}
Then call it as usual, but do not show it:
<codeEditor:test rendered="#{false}" />
It happens that the component is never displayed, and the bean never starts, as one might assume.
However, if we change the component as:
<cc:implementation>
<h:outputText value="#{testBean.someField}" />
</cc:implementation>
What happens is that the component is still never processed (because the attribute rendered false), however the bean gets an instance. This is what always happens when we use a bean property within a certain built-in JSF component ( h:panelGroup, h:inputHidden, whatever).
Why is this so?