f:param to composite components

元气小坏坏 提交于 2019-12-11 03:48:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!