[Resolvido]Link com facelets

1 resposta
D

Olá,

estou desenvolvendo uma página xhtml utilizando jsf e facelets, mas não estou conseguindo implementar
links em uma tabela, alguém poderia auxiliar?

<!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">
<body>
<ui:composition template="common.xhtml">

	<ui:define name="pageTitle">TESTE</ui:define>

	<ui:define name="pageHeader">Teste de Dados</ui:define>

	<ui:define name="pageBody">
		<form jsfc="h:form">
		<table jsfc="h:dataTable" value="#{visao.listaAdvogados}" var="list"
			border="1">
			<tr jsfc="h:column">
				#{list.nome}
			</tr>
			<tr jsfc="h:column">
				#{list.bairro}
			</tr>
			<tr jsfc="h:column">
				#{list.telefone}
			</tr>
		</table>
		
		<input type="submit"
			jsfc="h:commandButton" action="#{visao.voltar}" value="Voltar"/>
		
		</form>
	</ui:define>
</ui:composition>
</body>
</html>

Obrigado

1 Resposta

D

Achei a solução:

<!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">   
<body>   
<ui:composition template="common.xhtml">   
  
    <ui:define name="pageTitle">TESTE</ui:define>   
  
    <ui:define name="pageHeader">Teste de Dados</ui:define>   
  
    <ui:define name="pageBody">   
        <form jsfc="h:form">   
        <table jsfc="h:dataTable" value="#{visao.listaAdvogados}" var="list"   
            border="1">   
            <tr jsfc="h:column">   
                [color=red]<input type="submit" jsfc="h:commandLink" value="#{list.nome}" action="#{visao.pagina}"/>[/color]   
            </tr>
Criado 26 de outubro de 2007
Ultima resposta 26 de out. de 2007
Respostas 1
Participantes 1