未使用ui:include加载动态选项卡内容

时间:2014-07-22 07:52:46

标签: jsf jsf-2 primefaces tabview uiinclude

<ui:composition>
    <ui:decorate template="/view-fragments/section/frag_section.xhtml" >
        <ui:param name="AttrId" value="SOME_VALUE" />
        <ui:param name="AttrMinimized" value="false" />
        <ui:define name="AttrContentTitle">
            Some Title
        </ui:define>
        <ui:param name="AttrCollapsable" value="false" />
        <ui:define name="AttrContentBody">

            <h:form id="form_some_form" class="form-horizontal">

                <p:tabView id="tabView" widgetVar="tabView" dynamic="true" rendered="true" cache="true">
                    <p:tab id="tab1" title="title1">

                    </p:tab>

                    <ui:include src="/view-fragments/project/frag_tab2.xhtml" />
                    <ui:include src="/view-fragments/project/frag_tab3.xhtml" />
                    <ui:include src="/view-fragments/project/frag_tab4.xhtml" />
                    <ui:include src="/view-fragments/project/frag_tab5.xhtml" />
                    <ui:include src="/view-fragments/project/frag_tab6.xhtml" />


                </p:tabView>

            </h:form>


        </ui:define>
    </ui:decorate>
</ui:composition>

这不会加载tab2,tab3 ......等。 tabView的内容。但是如果我把它从p:tabView中删除,则会显示内容。有人可以帮忙吗?谢谢。

0 个答案:

没有答案