ajax停止工作在关闭事件primefaces

时间:2016-09-16 12:14:15

标签: ajax jsf primefaces

我得到了具有可关闭属性和渲染属性的面板。首先,渲染的面板是假的,所以它没有显示。

单击命令Button后,渲染的面板设置为true(在我的bean中命名为isShowChat),面板出现。 当我关闭该面板时,该窗口中的每个ajax都会关闭。

这是我的xhtml代码:

<h:form id="live-chat">
   <p:panelGrid class="panel-content" columns="2" columnClasses="form-right,form-left" id="live-chat-panelgrid">
       <p:panel style="min-width: 500px; height: 500px;" >
          <p:panel header="#{liveChatMBean.agent.name}" closable="true" rendered="#{liveChatMBean.isShowChat}">
              <p:ajax event="close" listener="#{liveChatMBean.onClose}" />
          </p:panel>
       </p:panel>
   </p:panelGrid>
</h:form>

这是我在on backing bean上的onClose方法:

public void onClose(CloseEvent event) {
    isShowChat = false;
}

我不知道为什么当我触发onClose监听器时,每个运行的ajax都会停止。

你们有没有遇到这个问题?谢谢你的帮助。

更新: 对不起,我忘了告诉萤火虫有错误。 in firebug

0 个答案:

没有答案