Ich benutze Primefaces 5.3 mit Bootsofts für meine Web-Layer. Das Problem, das ich habe ist, dass ich den Fehler „Primefaces ist nicht definiert“ in einer Facelet bekommen, wo ich die Komponente Umfrage verwenden wie folgt aus:Primefaces ist nicht definiert - JavaScript Fehler
<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>
Diese Facelet genannt analysis.xhtml ist ein Facelet Client des app_template .xhtml Vorlage und daher ist sein Stammelement wie folgt:
<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">
ich weiß, dass das Problem ist in der Regel aufgrund eines fehlenden der h: Kopf Label im Facelet, aber dies wird in der Vorlage wie folgt definiert:
<?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>
Kennt jemand das Problem zurückzuführen sein kann? Vielen Dank im Voraus :)
funktioniert es, wenn Sie einen (Dummy) setzen 'p: outputText' oder' p: inpuText' in der Vorlage? – Kukeltje
Ich habe es mit p: panel versucht und tut es auch –