2016-10-27 5 views
0

저는 내 웹 레이어에 대해 부츠 페이스와 함께 Primefaces 5.3을 사용하고 있습니다.Primefaces가 정의되지 않았습니다 - 자바 스크립트 오류

<b:row id="results"> 
    <c:if test="${not empty twitterSearch.text or not empty twitterSearch.result }"> 
     <b:panel title="Tweets for #{twitterSearch.text}" collapsible="false" look="info" col-md="6"> 
     <h:form> 
      <p:poll interval="3" update="sentimentChart" /> 
      <p:chart id="sentimentChart" type="pie" model="#{liveSentimentChartBean.liveCharts.get(twitterSearch.text)}" style="width:400px;height:300px"/> 
     </h:form> 
     </b:panel> 
    </c:if> 
</b:row> 
이 analysis.xhtml라고하는이 facelet은 app_template의 facelet 클라이언트입니다

: 내가 가진 문제는이 오류가 나는 다음과 같은 구성 요소를 여론 조사을 사용하십시오 facelet에서 "Primefaces이 정의되지 않은"이다

<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets" 
       xmlns:b="http://bootsfaces.net/ui" 
       template="/WEB-INF/templates/app_template.xhtml" 
       xmlns:h="http://xmlns.jcp.org/jsf/html" 
       xmlns:f="http://xmlns.jcp.org/jsf/core" 
       xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" 
       xmlns:p="http://primefaces.org/ui"> 

나는 문제는 일반적으로 누락 시간으로 인해 알고 : 다음 facelet 머리 라벨,하지만이 같은 템플릿에 정의되어 다음과 같이 .xhtml 템플릿 따라서 루트 요소이다

<?xml version='1.0' encoding='UTF-8' ?> 
<!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://xmlns.jcp.org/jsf/facelets" 
     xmlns:h="http://xmlns.jcp.org/jsf/html" 
     xmlns:b="http://bootsfaces.net/ui" 
     xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> 

    <h:head> 
     <meta charset="utf-8" /> 
     <title>#{i18n['page.title']}</title> 
     <meta name="viewport" content="width=device-width, initial-scale=1"/> 
     <meta name="revisit-after" content="7 days" /> 
     <meta name="DISTRIBUTION" content="GLOBAL" /> 
     <meta http-equiv="PRAGMA" content="NO-CACHE" /> 
    </h:head> 

    <h:body> 
     <c:set var="root" value="#{request.contextPath}/" /> 
     <ui:insert name="navbar"> 
      <ui:include src="/WEB-INF/content/navbar.xhtml"/> 
     </ui:insert> 
     <b:container> 
      <ui:insert name="content" /> 
     </b:container> 
     <ui:insert name="footer"> 
      <ui:remove> 
       <ui:include src="/WEB-INF/content/footer.xhtml"/> 
      </ui:remove> 
     </ui:insert> 
    </h:body> 
</html> 

enter image description here

사람은 문제가 원인 일 수 있습니다 알고 있나요? 미리 감사드립니다 :)

+0

가 작동합니까 작동? – Kukeltje

+0

나는 p : 패널을 사용해 보았고 그렇게했다. –

답변

0

보기를 만들 때 일부 구성 요소가 있어야하기 때문입니다. if가 충족되지 않으면 아무 것도 없으므로 라이브러리가 포함되지 않습니다. P

경우 outputText` 또는 'P : inpuText`를 템플릿에 InputText]를 예를 들어 포함되어 있습니다, 이것은 당신이 (더미)'페이지를 넣을 경우

관련 문제