Feras,
To tentando redirecionar pra uma página mas o JSF só redireciona pra mesma página. O que está errado:
template.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:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="/Horas/recursos/css/estilos.css" />
<a4j:loadScript src="/recursos/js/jquery.maskedinput-1.2.2.js" />
<style>
.optionList {
height:22px;
}
.vertical-menu-cell {
padding:0px 4px 0px 4px;
}
</style>
</head>
<body>
<f:view>
<table width="1270px" align="center">
<tr>
<td colspan="2" align="left"><h:graphicImage value="/resources/imagens/logo-oesia.jpg" /> </td>
</tr>
<tr>
<td colspan="2">
<h:form>
<rich:toolBar id="menuBar" itemSeparator="line" width="100%">
<rich:dropDownMenu>
<f:facet name="label">
<h:panelGrid cellpadding="0" cellspacing="0" columns="4" style="vertical-align:middle">
<h:outputText value="Indicadores"/>
</h:panelGrid>
</f:facet>
<rich:menuItem>
<f:facet name="icon">
<h:graphicImage value="/resources/imagens/reports.png"/>
</f:facet>
<h:commandLink action="#{menuMBean.exibirPaginaIndLevantamentoCenarios}" value="Levantamento de Cenários" />
</rich:menuItem>
<rich:menuItem>
<f:facet name="icon">
<h:graphicImage value="/resources/imagens/reports.png"/>
</f:facet>
<h:commandLink action="#{menuMBean.paginaIndTempoMedioExecucao}" value="Tempo Médio de Execução" />
</rich:menuItem>
<rich:menuItem>
<f:facet name="icon">
<h:graphicImage value="/resources/imagens/reports.png"/>
</f:facet>
<h:commandLink action="#{menuMBean.paginaIndEvolucaoOcorrencias}" value="Evolução de Ocorrências" />
</rich:menuItem>
<rich:menuItem>
<f:facet name="icon">
<h:graphicImage value="/resources/imagens/reports.png"/>
</f:facet>
<h:commandLink action="#{menuMBean.paginaIndReExecucaoCasosTeste}" value="Re-Execução de Casos de Teste" />
</rich:menuItem>
</rich:dropDownMenu>
</rich:toolBar>
</h:form>
<rich:spacer height="10px"/>
</td>
</tr>
<tr>
<td colspan="2">
<div id="navcontainer" align="center" style="height: 500px;overflow: auto;width: 1250px">
<ui:insert name="corpo"></ui:insert>
</div>
</td>
</tr>
</table>
</f:view>
</body>
</html>
MenuMBean
package com.aa.xx.mbeans;
public class MenuMBean {
public String exibirPaginaTestPlan(){
return "testPlan";
}
public String exibirPaginaIndLevantamentoCenarios(){
return "indicadorLevantamentoCenarios";
}
public String getPaginaIndTempoMedioExecucao(){
return "indicadorTempoMedioExecucao";
}
public String getPaginaIndEvolucaoOcorrencias(){
return "indicadorEvolucaoOcorrencias";
}
public String getPaginaIndReExecucaoCasosTeste(){
return "indicadorReExecucaoCasosTestes";
}
}
faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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_1_2.xsd">
<managed-bean>
<managed-bean-name>menuMBean</managed-bean-name>
<managed-bean-class>com.aa.xxx.mbeans.MenuMBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>indicadorLevantamentoCenarios</from-outcome>
<to-view-id>/paginas/indicadores/projeto.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>