I have a composite JSF 2.2 component like the following simplified example:
<cc:interface>
<cc:attribute name="widgetVar" required="true" />
</cc:interface>
<cc:implementation>
.
<p:dialog ... widgetVar="#{cc.attrs.widgetVar}" ..>
.
<cc:renderFacet name="customFacet" />
.
</p:dialog>
</cc:implementation>
The composite component shows a Primefaces Dialog and adds content to the dialog in form of a facet with name "customFacet".
Now I use the composite component and define a facet:
.
<m:myCompositeComponent widgetVar="customWidgetVar">
<f:facet name="customFacet">
<p:commandButton value=".." oncomplete="PF('#{cc.attrs.widgetVar}').hide();"/>
</f:facet>
</m:myCompositeComponent>
The content of the facet "customFacet" is a Primefaces Commandbutton which should close the view of the composite component upon click using the widget var of the composite component. The widget var of the composite component is here accessed using PF('#{cc.attrs.widgetVar}') and the question is: Is it allowed to used "cc.attrs" within the facet of a composite component or not from the JSF specification view?
Btw: the code works with MyFaces 2.2.12 whereas throws a NullpointerException with 2.2.14 (as a Result of Myfaces-4099).
Thanky for help Ulrich