primefaces轮询组件没有';t调用方法5.1
我正在使用primefaces 5.1的轮询组件 我有一个jsf2页面primefaces轮询组件没有';t调用方法5.1,primefaces,jsf-2,Primefaces,Jsf 2,我正在使用primefaces 5.1的轮询组件 我有一个jsf2页面 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<ui:composition template="/templates/securedContent.xhtml">
<ui:define name="content">
<h:form id="form">
<p:poll interval="1"
listener="#{counterView.increment}" update=":form" />
<p:outputLabel value="#{counterView.number}" />
</h:form>
</ui:define>
</ui:composition>
</html>
我使用的是primefaces 5.1,民意测验没有按预期调用Bean方法。有人能帮我吗?“民意测验没有按预期调用Bean方法”你怎么知道。。。您调查了什么?我对bean方法进行了调试,没有执行任何操作,但在客户端执行,而不是在监听器上执行>>>oncomplete=alert('hi'),并且出现了警报,但方法Nothing只是调试的一小部分。检查浏览器中的请求,等等。200 OK POST 0]]>嗯,正在调用某个东西。。。请创建一个“我在更新中看到代码中没有的内容…”。。。
package main.com.zc.project.presentation.attendance.bean;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;
@ManagedBean
@ViewScoped
public class CounterView implements Serializable {
private int number;
public int getNumber() {
return number;
}
public void increment() {
number++;
}
}