将primefaces从2.2.1升级到4.0版本(与5.0版本相同)后,导航到部署在Tomcat7上的/abtest.xhtml页面时,得到以下错误:
javax.servlet.ServletException: /abtest.xhtml: Property 'onFlowProcess' not found on type com.web.faces.abtest.ABTestWizard
javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)在pom.xml中有:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.7</version>
</dependency>在abtest.xhtml中有:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
...
xmlns:p="http://primefaces.prime.com.tr/ui"
...
<p:wizard id="abtestwizard" widgetVar="wiz" flowListener="#{abwizard.onFlowProcess}" showStepStatus="false" effect="false" showNavBar="false" onback="jQuery('.equalHeight').equalHeights();" onnext="jQuery('.equalHeight').equalHeights();">在com.web.faces.abtest.ABTestWizard中:
@Component("abwizard")
@Scope("view")
public class ABTestWizard implements Serializable {
...
public String onFlowProcess(org.primefaces.event.FlowEvent event) { ...
}
...
}向导标记的flowListener属性似乎设置正确,因此不知道发生此错误的原因。
将感谢任何想法或提示来解决这个问题。
发布于 2014-08-28 03:28:39
你的pom.xml里也有这个吗?
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>您也可能在bean中遗漏了一些导入。您列出了哪些进口产品?
https://stackoverflow.com/questions/24144763
复制相似问题