【问题标题】:JSF2: How do I render composite component's children at a specific location within component?JSF2:如何在组件内的特定位置呈现复合组件的子级?
【发布时间】:2011-09-06 07:36:58
【问题描述】:

我在引用和显示复合组件的子组件时遇到问题:

<xyz:mycomponent>
  <h:outputText value="some text"/>
  <h:outputText value="another text"/>
</xyz:mycomponent>

mycomponent 的定义如下:

<composite:implementation>
  <!-- some tags here -->
  <h:paneGroup>
    <!-- I want component's childs (two outputText's) to be rendered here -->
  </h:paneGroup>
</composite:implementation>

我可以通过#{cc.children} 列出组件的子组件,但我不知道如何在复合组件的特定位置呈现它们。有什么想法或解决方法吗?

【问题讨论】:

标签: java jsf jsf-2 composite-component


【解决方案1】:

&lt;composite:insertChildren&gt; 可以解决问题。

【讨论】:

    猜你喜欢
    • 2012-09-10
    • 1970-01-01
    • 2011-06-26
    • 2012-12-07
    • 1970-01-01
    • 2011-11-27
    • 2012-06-03
    • 2020-10-12
    • 2017-02-07
    相关资源
    最近更新 更多