手风琴小组不起作用

时间:2014-02-27 05:31:23

标签: jsf primefaces xhtml

我只有2个xhtml页面。第一页包含一个带有按钮的表单,我已经设置了导航规则,在这个按钮点击时,我只是从后面返回“成功”,因此第二页打开,其中包含手风琴面板。但问题是,页面加载后页面冻结,你知道手风琴面板中的标签无法展开。 (即)手风琴组无法工作。

第1页:

<h:form>
<p:commandButton action="#{Bean.check}" value="click"></p:commandButton>
</h:form>

第2页:

<h:form>
<p:accordionPanel  activeIndex="#{Bean.store}">
        <p:tab title="tab1">
            <h:commandLink value="click"></h:commandLink>
            <br />
            <h:commandLink value="next"></h:commandLink>
            <br />
            <h:commandLink value="previous"></h:commandLink>
        </p:tab>

        <p:tab title="tab2" id="jun" >
            <p:commandLink value="click" action="override.xhtml"
                >
                                    <p:effect event="click" type="highlight"></p:effect>

            </p:commandLink>

            <br />
            <p:commandLink value="next" action="header.xhtml"></p:commandLink>
            <br />
            <p:commandLink value="previous"></p:commandLink>
        </p:tab>

        <p:tab title="tab3">
            <h:commandLink value="click"></h:commandLink>
            <br />
            <h:commandLink value="next"></h:commandLink>
            <br />
            <h:commandLink value="previous"></h:commandLink>

        </p:tab>

        </p:accordionPanel> 

         </h:from>

先谢谢

1 个答案:

答案 0 :(得分:0)

当ManagedBean没有值时,通常会发生这种情况 验证#{Bean.store}是否正确生成 或者删除acticeIndex属性。