JSF 2.0 y Primefaces con Facelets
Estoy tratando de incorporar primefaces en mi proyecto web JSF 2.0.
Recientemente he actualizado de facelets 1.x a 2.0 y agregué primefaces jar a la carpeta de mi biblioteca. Todo está bien, excepto que la forma en que tengo estructuradas mis plantillas tiene un conflicto con los primefaces.
mitemplate.xhtml Se ve como esto:
<code><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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"> <h:head> <title><ui:insert name="title">MILO</ui:insert></title> //Css //js </h:head> <h:body class="milo"> <h:form styleClass="miloForm" enctype="multipart/form-data"> <div id="container"> <ui:insert name="header"> <ui:include src="/WEB-INF/templates/header.xhtml"/> </ui:insert> <ui:insert name="content"> <!-- include your content file or uncomment the include below and create content.xhtml in this directory --> </ui:insert> <ui:insert name="footer"> <ui:include src="/WEB-INF/templates/footer.xhtml"/> </ui:insert> </div> </h:form> </h:body> </code>
Y miindex.xhtml mirado Me gusta esto:
<code><!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.org/ui"> <ui:composition template="/WEB-INF/templates/base.xhtml"> <ui:define name="content"> <p:editor/> </ui:define> </code>
Una vez que tenga esto, el editor p: no aparecerá. ¿Alguna idea de por qué? La consola no me mostrará ninguna advertencia / error.
EDITAR >>> Error JS encontrado