JSF - p:tabView - 仍然显示更改选项卡和上一个视图

时间:2010-12-27 12:30:01

标签: jsf primefaces tabview

在一个标签内,我可以按一个按钮来显示“h:groupPanel”。如果我这样做,然后更改活动选项卡,刚刚出现的groupPanel仍然可见,并显示在当前当前选项卡的顶部。

tabView的代码是:

<p:tabView dynamic="true" cache="false" id="characterTabView">
    <p:tab title="View" id="viewTab">
         <ui:include src="/sections/character/view.xhtml" />
     </p:tab>
    <p:tab title="Upgrade" id="upgradeTab">
        <ui:include src="/sections/character/upgrade.xhtml" />
    </p:tab>
</p:tabView>

“升级”页面看起来像

<h:panelGroup id="searchCompetencies" rendered="#{characterBean.rightPanel == 'searchResult'}">
    <h:panelGroup styleClass="characterUpgradeLeft">
        <ui:include src="/sections/character/searchViewLeft.xhtml" />
    </h:panelGroup>
    <h:panelGroup id="competencyCreation" rendered="#{characterBean.rightPanel == 'competencyCreation'}">
        <!--  The panel that is made visible -->
    </h:panelGroup>

使组件可见的页面(searchViewLeft):

<p:fieldset legend="Create competency" styleClass="createCompetencyStart">
    <h:form>
        <p:commandButton value="Create competency" type="button" onclick="toggleCreate()" update="upgradeTab" />
    </h:form>
</p:fieldset>

其中“toggleCreate”更改“characterBean.rightPanel”的值。

你对我在这里缺少的东西有任何想法吗?

非常感谢:)

0 个答案:

没有答案