4

次のような複合コンポーネントの子を参照して表示するのに問題があります。

<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}が、複合コンポーネントの特定の場所でそれらをレンダリングする方法がわかりません。アイデアや回避策はありますか?

4

1 に答える 1

7

<composite:insertChildren>トリックを行います。

于 2011-06-01T13:38:58.703 に答える