Olá pessoal,
Estou com o seguinte problema.
Tenho 2 páginas html, 1 é o template, e a outra faz parte deste template.
Não consigo de jeito nenhum fazer meu <h:commandLink/> funcionar, só quando eu deixo o html fora do template. Alguem sabe porque?
TEMPLATE
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title><ui:insert name="titulo">PosWeb - Emprestimo - UTFPR</ui:insert></title>
</head>
<body>
<h:form>
<div style="position:absolute; left:0px; top:0px; width:100%; height:100px; z-index:1;">
<ui:insert name="cabecalho">Cabecalho</ui:insert>
</div>
<div style="position:absolute; left:0px; top:150px; width:100%; height:600px; z-index:3;">
<ui:insert name="conteudo">
</ui:insert>
</div>
</h:form>
</body>
</html>
CONTEUDO
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<body>
<ui:composition template="/WEB-INF/templates/template.xhtml">
<ui:define name="cabecalho">
<ui:include src="cabecalho.xhtml" />
</ui:define>
<ui:define name="conteudo">
<p>Cadastro de Clientes</p>
<rich:tabPanel width="240">
<rich:tab label="Lista de Clientes" name="cliente">
<h:form>
<rich:dataTable
value="#{clienteController.clientes}" var="f"
rendered="#{not empty clienteController.clientes}"
rows="12" cellpadding="10" width="100%" >
<h:column>
<f:facet name="header"><h:outputText value="Id"/></f:facet>
<h:outputText value="#{f.id}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Nome"/></f:facet>
<h:outputText value="#{f.nome}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Nascimento"/></f:facet>
<h:outputText value="#{f.nascimento}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Telefone"/></f:facet>
<h:outputText value="#{f.telefone}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Celular"/></f:facet>
<h:outputText value="#{f.celular}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="E-mail"/></f:facet>
<h:outputText value="#{f.email}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="RG"/></f:facet>
<h:outputText value="#{f.rg}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="CPF"/></f:facet>
<h:outputText value="#{f.cpf}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Endereco"/></f:facet>
<h:outputText value="#{f.endereco}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Profissao"/></f:facet>
<h:outputText value="#{f.profissao}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Renda"/></f:facet>
<h:outputText value="#{f.renda}"/>
</h:column>
<h:column>
<h:commandLink actionListener="#{clienteController.escolheCliente}" >
<h:outputText value="Alterar"/>
<f:param id="idParaAlterar" value="#{f.id}" />
</h:commandLink>
</h:column>
<h:column>
<h:commandLink actionListener="#{clienteController.deletaCliente}" >
<h:outputText value="Excluir"/>
<f:param id="deletaCliente" value="#{f}"/>
</h:commandLink>
</h:column>
</rich:dataTable>
</h:form>
</rich:tab>
<rich:tab label="Ficha do Cliente" name="fichaCliente">
<a4j:form id="clienteCRUD">
<h:panelGrid columns="2">
<h:outputText value="Nome:"/>
<h:inputText value="#{clienteController.cliente.nome}"/>
<h:outputText value="Nascimento:"/>
<rich:calendar value="#{clienteController.cliente.nascimento}"
locale="pt/BR"
popup="true"
datePattern="dd/MM/yyyy"
showApplyButton="true" cellWidth="24px" cellHeight="22px" style="width:200px"/>
<h:outputText value="Endereco:"/>
<h:inputText value="#{clienteController.cliente.endereco}"/>
<h:outputText value="Rg:" />
<h:inputText value="#{clienteController.cliente.rg}"/>
<h:outputText value="Cpf:" />
<h:inputText value="#{clienteController.cliente.cpf}"/>
<h:outputText value="Fone:"/>
<h:inputText value="#{clienteController.cliente.telefone}"/>
<h:outputText value="Celular:"/>
<h:inputText value="#{clienteController.cliente.celular}"/>
<h:outputText value="E-mail:"/>
<h:inputText value="#{clienteController.cliente.email}"/>
<h:outputText value="Profissao:"/>
<h:inputText value="#{clienteController.cliente.profissao}"/>
<h:outputText value="Renda:"/>
<h:inputText value="#{clienteController.cliente.renda}"/>
</h:panelGrid>
<a4j:commandButton value="Salvar" action="#{clienteController.salvar}" onchange="cliente"/>
</a4j:form>
</rich:tab>
</rich:tabPanel>
</ui:define>
</ui:composition>
</body>
</html>