cc refers to the top-level composite component that is processed during the evaluation.
component component ui is simply processed.
Therefore, when inside a composite component ccrefers to the "parent" component, and componentwhen it is used in a separate component, refers to this particular instance. Or for simple cases:
cc == component.getCompositeComponentParent(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:interface/>
<cc:implementation>
<h:outputText value="Own ID: #{component.id}, parent composite ID: #{cc.id}" /> <br/>
<h:outputText value="Own ID: #{component.id}, parent composite ID: #{cc.id}" />
</cc:implementation>
</html>
Facelet "" , outputText, .
, , .