Primefaces TabChangeEvent不会触发

时间:2014-01-17 20:07:08

标签: jsf-2 primefaces

我在weblogic 10.3.6上运行了JSF 2.2(Mojarra)和Primefaces 3.5的项目。

这是我的一段代码。

<ui:composition>
    <ui:define>
        ...
        <p:layout>
            <p:layoutUnit id="filters">
                <h:form id="form_filters">
                ...
                </h:form>
            </p:layoutUnit>
            <p:layoutUnit id="Tabs">
                <h:form id="form_tabs">
                    <p:tabView id="tw" 
                            dynamic="true" 
                            cache="false" 
                            onTabShow="handleTab();"
                            activeIndex="#{research.tabIndex}">

                            <p:ajax event="tabChange" 
                                listener="#{research.onTabChange}" 
                                partialSubmit="true" 
                                process="tw"/>

                            <p:tab id="Included" title="#{msg['research.tab.included']}" 
                                rendered="#{p:ifAnyGranted('ROLE_PROJECT_MANAGER, ROLE_TECNICAL_TEAM')}" > 
                                <h:panelGroup id="included_table" styleClass="scrollable" 
                                    layout="block" 
                                    rendered="#{p:ifAnyGranted('ROLE_PROJECT_MANAGER, ROLE_TECNICAL_TEAM')}">
                                    <ui:include src="/pages/research/include_table.xhtml" />
                                </h:panelGroup>
                            </p:tab>
                            <p:tab id="Reviewed" title="#{msg['research.tab.reviewed']}" 
                                rendered="#{p:ifAnyGranted('ROLE_PROJECT_MANAGER, ROLE_REGISTRATION, ROLE_SUPPLIES')}">
                                <h:panelGroup id="reviewed_table" styleClass="scrollable" 
                                    layout="block" rendered="#{p:ifAnyGranted('ROLE_PROJECT_MANAGER')}">
                                    <ui:include src="/pages/research/all_table.xhtml" />
                                </h:panelGroup>
                                <h:panelGroup id="registration_reviewed_table" styleClass="scrollable" 
                                    layout="block" rendered="#{p:ifAnyGranted('ROLE_REGISTRATION, ROLE_SUPPLIES')}">
                                    <ui:include src="/pages/research/registration_reviewed_table.xhtml" />
                                </h:panelGroup>
                            </p:tab>
                        </p:tabView>
                </h:form>
            </p:layoutUnit>
        </p:layout>
    </ui:define>
</ui:composition>

我的问题是:

我过滤了标签1(包含)内部的一些数据(一个p:datatable)。当我单击选项卡2(已审核)时,tabChange事件不会触发。但是,如果我再次过滤并更改标签,则事件会响应。

你有任何提示吗?

如果您需要更多代码或有疑问,请告诉我!

最好的问候!

0 个答案:

没有答案