Galera, to com um duvida simples, estou iniciando agora com JSF e estou tendo um problema um quanto simples,
quero apenas mudar de página ao clicar num commandLink, tenho a página index.xhtml e parceiros.xhtml criadas, com esse script na index.xhtml
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert Title Here</title>
</h:head>
<h:body>
<h:form>
<div id="topo" align="center">
<table style="margin:0 auto;">
<tr>
<td><p:graphicImage id="imgBanner" value="images/banner.png"/></td>
</tr>
</table>
</div>
<div id="corpo">
<table>
<tr><td><h:commandLink id="lnkParceiro" value="Nossos Parceiros" action="partner"/></td></tr>
</table>
</div>
</h:form>
</h:body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0" metadata-complete="false">
<navigation-rule>
<from-view-id>/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>partner</from-outcome>
<to-view-id>/parceiros.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
</faces-config>
Não era pra funcionar normalmente? Tentei até pelo que vi, no action colocar um método String com o retorno com o mesmo texto do
Valeu galera! :wink: