问题
In JSF2.1 composite component if we try to pass f:param to a composite component (command button) and recieve in the component as editableValueHolder ,It doesn't seems to be working,
Any ideas?
<mycomp id="button" outcome="newpage" >
<f:param name="foo" outcome="bar" for="button"/>
</mycomp>
compositeComponent....
<cc:interface>
<cc:attribute name="action" targets="commandLink" required="true" />
</cc:interface>
<cc:implementation>
<h:commandLink id="commandLink" action="#{cc.attrs.action}">
</h:commandLink>
</cc:implementation>
回答1:
Use <cc:insertChildren>.
<h:commandLink ...>
<cc:insertChildren />
</h:commandLink>
来源:https://stackoverflow.com/questions/10884447/fparam-to-composite-components