tenho uma aplicação em JSF + Primefaces 2 feito ja faz um tempo, funcionando perfeitamente, resolvi utilizar o mesmo esquema de layout e componentes do PrimeFaces, mas quero utilizar a versão 3 do Primefaces, feito isso comecei a ter problemas com os forms do template, alguem ja passou por isso?
Segue as paginas jsf
home.xhtml
[code]<?xml version=“1.0” encoding=“ISO-8859-1”?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p=“http://primefaces.org/ui”>
<ui:composition template="../resources/template.xhtml">
<ui:define name="login">
<ui:include src="../resources/usuarioLogado.xhtml"/>
</ui:define>
<ui:define name="menu">
<ui:include src="../resources/menu.xhtml" />
</ui:define>
</ui:composition>
</html>[/code]
template.xhtml
[code]<h:body>
<p:growl id=“growlMessage” showDetail=“true” />
<ui:insert name="body">
<p:layout fullPage="true">
<p:layoutUnit position="top" height="52">
<p:panel id="pnl-topo" styleClass="topo">
<ui:insert name="login">
<ui:include src="usuarioLogado.xhtml"/>
</ui:insert>
</p:panel>
</p:layoutUnit>
<p:layoutUnit position="center" closable="false">
<p:outputPanel id="pnlMenu"
rendered="#{sec:ifAnyGranted('ROLE_ADMIN')}">
<ui:insert name="menu">
<ui:include src="menu.xhtml" />
</ui:insert>
</p:outputPanel>
<br/>
<p:outputPanel id="pnlCorpo">
<ui:insert name="corpo">
<ui:include src="#{menuController.menuSelected}"/>
</ui:insert>
</p:outputPanel>
</p:layoutUnit>
<p:layoutUnit position="bottom" height="75">
<ui:include src="rodape.xhtml"/>
</p:layoutUnit>
</p:layout>
<ui:include src="dlgAlterarSenha.xhtml" />
<p:outputPanel id="pnlDialog" rendered="#{menuController.hasDialog}">
<ui:insert name="dialog">
<ui:include src="#{menuController.dialogSelected}"/>
</ui:insert>
</p:outputPanel>
</ui:insert>
</h:body>[/code]
dlgAlterarSenha.xhtml
[code]<?xml version=“1.0” encoding=“ISO-8859-1”?>
<!DOCTYPE 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:p="http://primefaces.org/ui"
xmlns:ui=“http://java.sun.com/jsf/facelets”>
<p:dialog id="dlgAlterarSenha" widgetVar="dlgAlterarSenha" header="Alterar Senha"
resizable="false" width="250" height="170" modal="true" showEffect="clip">
<h:form prependId="false">
<h:panelGrid id="pnlAlterarSenha" columns="2">
<h:outputLabel for="txtSenhaAtual" value="Senha Atual"/>
<p:password id="txtSenhaAtual" value="#{loginController.senhaAtual}" feedback="false" required="true" minLength="1"/>
<h:outputLabel for="txtSenhaNova" value="Senha Nova"/>
<p:password id="txtSenhaNova" value="#{loginController.senhaNova}" feedback="false" required="true" minLength="1"/>
<h:outputLabel for="txtSenhaConfirma" value="Confirmação"/>
<p:password id="txtSenhaConfirma" value="#{loginController.senhaConfirmacao}" feedback="false" required="true" minLength="1" />
<br/><br/>
<f:facet name="footer">
<p:commandButton value="Salvar" styleClass="btn-texto" image="btn-aceito" update="growlMessage"
action="#{loginController.salvarNovaSenha}" oncomplete="dlgAlterarSenha.hide()" />
<p:commandButton value="Cancelar" type="buttom" onclick="dlgAlterarSenha.hide()"
styleClass="btn-texto" image="btn-cancelar"/>
</f:facet>
</h:panelGrid>
</h:form>
</p:dialog>
</html>[/code]
usuarioLogado.xhtml
[code]<?xml version=“1.0” encoding=“ISO-8859-1”?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:p="http://primefaces.org/ui"
xmlns:h=“http://java.sun.com/jsf/html”>
<h:form prependId="false">
<p:panel styleClass="pnl-topo">
<h:graphicImage url="${facescontext.currentinstance}/img/empresa.png" styleClass="borda-ie"/>
<h:graphicImage url="${facescontext.currentinstance}/img/usuario.png" styleClass="borda-ie"/>
<h:outputText value=" #{loginController.usuarioLogado} [ "/>
<p:commandLink id="lnkAlterarSenha" value="Alterar Senha" update="pnlAlterarSenha"
oncomplete="dlgAlterarSenha.show()"/>
<h:outputText value=" | "/>
<p:commandLink action="#{loginController.logout}" value="Sair" process="@this"/>
<h:outputText value=" ]"/>
</p:panel>
</h:form>
</html>[/code]
Ao executar o login dispara a mensagem
Cannot find component with identifier “pnlAlterarSenha” referenced from “lnkAlterarSenha”.
Obs: Esse template funciona normalmente no Primefaces 2