The <ui:param>
indeed merely creates an alias and the EL expression is still deferred and evaluated on every access in the very same context as where it's been referenced (and thus not where it's been declared! that explains your concrete problem). Besides, the <ui:param>
is designed to be used on <ui:include>
, <ui:composition>
and <ui:decorate>
only.
Use <c:set>
instead. It's capable of immediately evaluating an EL expression and storing its result in either request, view, session or application scope via the scope
attribute.
<c:set var="rdfaComp" value="#{component.namingContainer.clientId}" scope="request" />
Update: you actually wanted to get the client ID of the composite component itself, here's how you can get it:
<c:set var="rdfaComp" value="#{cc.clientId}" scope="request" />