在 JSF2.1 复合组件中,如果我们尝试将 f:param 传递给复合组件(命令按钮)并在组件中接收 editableValueHolder ,它似乎不起作用,
有什么想法吗?
<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>
最佳答案
使用 <cc:insertChildren>
.
<h:commandLink ...>
<cc:insertChildren />
</h:commandLink>
关于jsf-2 - :param to composite components,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10884447/