【问题标题】:f:param to composite componentsf:param 到复合组件
【发布时间】:2012-06-08 17:04:48
【问题描述】:

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

【问题讨论】:

    标签: jsf-2 parameter-passing facelets composite-component


    【解决方案1】:

    使用&lt;cc:insertChildren&gt;

    <h:commandLink ...>
        <cc:insertChildren />
    </h:commandLink>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-02
      • 2016-08-03
      • 2015-06-01
      • 1970-01-01
      • 2013-05-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多