2012-03-21 5 views
1

나는 방금 추가 PrimeFaces에게 JSF 프로젝트에 3.0 렌더링하지 않습니다PrimeFaces 구성 요소는 인식되지 않고

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

<dependency> 
     <groupId>org.primefaces</groupId> 
    <artifactId>primefaces</artifactId> 
    <version>3.0</version> 
</dependency> 

을 그리고 나는이 테스트 페이지 생성 :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:p="http://primefaces.prime.com.tr/ui"> 
    <h:head> 
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    </h:head> 
    <h:body> 
     <h:form> 
      <p:panel header="F.C. Barcelona" footer="Visca el Barca!"> 
       <h:outputText value="FC Barcelona " /> 
      </p:panel> 

      <h:outputText id="name" value="#{facesBean.name}" />    <h:commandButton value="Submit" action="#{facesBean.callService()}" /> 
     </h:form> 
    </h:body> 
</html> 

을하지만 <p:panel> 구성 요소는 아니다 렌더링. <h:xxx> 구성 요소 만 올바르게 렌더링됩니다.

나는 Maven 의존성과 대상 폴더에 PrimeFaces jar를 가지고있다. Tomcat 7을 사용하고 있습니다. PrimeFaces에는 추가 구성이 필요하지 않습니다. 맞습니까?

답변

2
xmlns:p="http://primefaces.prime.com.tr/ui" 

이 XML 네임 스페이스는 PrimeFaces 2.x 전용입니다. PrimeFaces 3.0 이후, 새로운 XML 네임 스페이스는하지 2.x 또는 3.0

xmlns:p="http://primefaces.org/ui" 

당신이 PrimeFaces 3.0와 관련된 문서/튜토리얼을 읽고 있는지 확인하다

+1

Work ... 고마워! –

관련 문제