本文介绍了f:复合组件的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JSF2.1复合组件中,如果我们尝试将f:param传递给复合组件(命令按钮)并在该组件中将其接收为editableValueHolder,则它似乎不起作用,

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,

有什么想法吗?

 <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>

这篇关于f:复合组件的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 21:58
查看更多