【问题标题】:commandButton actionListener not called when page reloaded页面重新加载时未调用 commandButton actionListener
【发布时间】:2014-12-09 09:13:06
【问题描述】:

我正在使用 primefaces(3.2) 创建一个 JSF 应用程序。基本上我有这个tabview。有一个选项卡视图,每个选项卡都包含一个命令按钮。我第一次能够调用 actionListener 并重定向到主屏幕。现在,当我回到这个页面时,没有一个 actionListener 正在调用这些方法。

我附上了简化的 xhtml 代码。

<h:form id="syncpasswdform">
    <p:tabView id="tabviewid" onTabChange="tabChangeEvent();">
        <p:tab title="#{msg.sync_pwd_nw_per}" >
            <p:commandButton  id="syncbutton" 
                              actionListener="#{SyncPasswordBean.syncPassword}"  
                              value="#{msg.sync_pwd_nw_res_pwds}">
        </p:tab>
        <p:tab title="#{msg.sync_pwd_nw_nonpers}">
            <p:commandButton  id="non_pers_syncbutton" 
                              actionListener="#{NonPersonalSyncPasswordBean.syncPassword}"  
                              value="#{msg.sync_pwd_nw_nonpers_res_pwds}">
        </p:tab>
    </p:tabView>
</h:form>

【问题讨论】:

    标签: spring jsf primefaces jboss


    【解决方案1】:

    您的支持 bean 中可能有错误。尝试在您的 p:commandButton 中设置选项 ajax="false" 以实际查看错误。 希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多