如何使用项目模板创建基于集合的复合材料?

时间:2019-06-25 14:15:03

标签: jsf

仅使用复合材料就可以执行以下操作:?

<customComposite:listRenderer list="#{bean.list}" var="item">
    <h:panelGroup>
        <!-- item template -->
    </h:panelGroup>
</customComposite:listRenderer>

listRenderer.xhtml

<ui:composition ...>
    <composite:interface>
        <composite:attribute name="list" type="java.util.List" required="true"/>
        <!-- how to expose "item" via attribute? -->
        <composite:attribute name="var" ???>
    </composite:interface>

    <composite:implementation>
        <ui:repeat value="#{cc.attrs.list}" var="item">
            <!-- place there somehow item template -->
        </ui:repeat>
    </composite:implementation>
</ui:composition>

0 个答案:

没有答案