<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!-- Variáveis a serem definidas: formId, managed -->
<h:head>
<link type="text/css" rel="stylesheet" href="css/dot-luv/skin.css"></link>
</h:head>
<h:body>
<p:growl id="templateGrowl"/>
<p:panel header="#{msg.cadastroAlunos}">
<h:form id="#{formId}">
<p:commandButton
action="#{managed.novo}"
value="#{msg.novo}"
update="#{formId}"/>
<p:commandButton
action="#{managed.salvar}"
value="#{msg.salvar}"
update="templateGrowl,#{formId}"/>
<p:commandButton
action="#{managed.excluir}"
value="#{msg.excluir}"
update="templateGrowl,#{formId}"/>
<p:commandButton
value="#{msg.procurar}"
update="templateGrowl,#{formId}"/>
<ui:insert name="conteudo"/>
</h:form>
</p:panel>
</h:body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition template="/templates/templateCadastro.xhtml">
<ui:param name="formId" value="formCadastroAluno" />
<ui:param name="managed" value="#{managedAluno}" />
<ui:param name="modalId" value="modalCadastroAluno" />
<ui:define name="conteudo">
<h:panelGrid columns="2">
<h:outputText value="#{msg.nome}"/>
<h:inputText value="#{managedAluno.aluno.nome}"/>
</h:panelGrid>
</ui:define>
</ui:composition>
</html>
<p:dialog id="cadAluno" widgetVar="cad" width="850">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Cadastro Aluno" />
</h:panelGroup>
</f:facet>
<ui:include src="/cadastros/cadastroAluno.xhtml" />
</p:dialog>
<p:submenu label="Cadastros">
<p:menuitem
value="Alunos"
url="#"
id="menuCadAluno"
onclick="cad.show()" />
<p:menuitem value="Follow-up" url="#" />
</p:submenu>
estou usando primefaces 2.1RC1-snapshot com jsf 2.0 (mojarra 2.0.2 FCS) com o tomcat 6
tentei tambem um integração com o richfaces (3.3.3) e no lugar do p:dialog, havia um rich:modalPanel. ele até abria, mas não mostrava os campos do cadastros e ao clicar no botão novo, por exemplo, lançava uma exceção dizendo que o viewId era nulo. não faço a menor idéia do que seja o viewId :oops: