0

別のコンポジットの実装タグ内で JSF2 コンポジット (ウィジェット) を呼び出すにはどうすればよいでしょうか?

そうすると、次のようになりますerror: /resources/widgets/tileContainer.xhtml @25,45 <mywidgets:tileContainer> Tag Library supports namespace: http://java.sun.com/jsf/composite/widgets, but no tag was defined for name: tileContainer

コード スニペットは次のとおりです。

<composite:interface name="tileContainer">
    <composite:attribute name="pubCategoryId" type="java.lang.Long" required="true" />
</composite:interface>

<composite:implementation>
    <div class="tileContainer">

        <ui:repeat value="#{pubController.getPubsByCategory(cc.attrs.pubCategoryId)}" var="pub">
            #{pub.title}
            <mywidgets:tileContainer title="Private">
                <mywidgets:tileSmallPictureTitle                        
                    title="Bulk Dispatch Lapse stressed with application protocols">
                </mywidgets:tileSmallPictureTitle>
            </mywidgets:tileContainer>
        </ui:repeat>

    </div>
</composite:implementation>

これを処理する方法に関する他の設計上の推奨事項はありますか?

あなたの考えを共有してくれてありがとう。

4

2 に答える 2

1

これは、Mojarra 2.1.10 (2012 年 7 月 25 日リリース) で修正されたMojarra issue 2437として認識できます。かなり古い Mojarra バージョンを使用しているようです。現在すでに 2.1.25 です (2.2.x はすでにリリースされていますが、今すぐ 2.2 に切り替えることはお勧めしません。最初にすべての子供の病気を修正してもらいます)。

于 2013-08-13T13:05:32.453 に答える
0

わかりました、複合ディレクトリの名前空間宣言をタグから<html xmlns...タグに移動しました<composite:implementation>

したがって、コンポジットは次のようになります。

<composite:implementation xmlns:mywidgets="http://java.sun.com/jsf/composite/widgets">

そうしないと、親と子のコンポジットの名前空間が正しく解決されません。

于 2013-08-13T07:08:37.017 に答える