2014-06-10 37 views
0

在將primefaces從2.2.1升級到4.0版本(與5.0版本相同)後,當導航到部署在tomcat 7上的/abtest.xhtml頁面時,以下錯誤:Primefaces升級到4.0(或5.0)版本原因Property not found on type

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) { ... 
    } 
... 
} 

的P的flowListener屬性:嚮導標籤似乎爲什麼這個錯誤發生時要正確設置,所以不知道。

希望任何想法或提示來解決問題。

回答

0

你是否也在你的pom.xml中有這個?

 <repository> 
     <id>prime-repo</id> 
     <name>PrimeFaces Maven Repository</name> 
     <url>http://repository.primefaces.org</url> 
     <layout>default</layout> 
    </repository> 

您也可能缺少一些您的bean導入。你列出了哪些進口產品?

相關問題