Richfaces + myfaces navegaÇÃo nÃo funciona

8 respostas
D

Pessoal estou tentando utilizar o richfaces 3.2 e myfaces 1.2

Meu problema é que simplesmente fiz a regra de navegação no faces-config e quando executo a aplicação a navegação de nada funciona.

Alguem poderia me dar uma luz?

8 Respostas

vanilton.coelho

poasta o faces-config.

D
<?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_1_2.xsd"
	version="1.2">

	<managed-bean>
		<managed-bean-name>loginController</managed-bean-name>
		<managed-bean-class>
			controller.LoginController
		</managed-bean-class>
		<managed-bean-scope>request</managed-bean-scope>
	</managed-bean>
	<navigation-rule>
		<from-view-id>/cad/cadtime.jsp</from-view-id>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/index.jsp</from-view-id>
		<navigation-case>
			<from-outcome>indexmain</from-outcome>
			<to-view-id>/indexmain.jsp</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/indexmain.jsp</from-view-id>
		<navigation-case>
			<from-outcome>cadtime</from-outcome>
			<to-view-id>/cad/cadtime.jsp</to-view-id>
			<redirect />
		</navigation-case>
		<navigation-case>
			<from-outcome>listatime</from-outcome>
			<to-view-id>/time/listatime.jsp</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/cad/cadtime.jsp</from-view-id>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/time/listatime.jsp</from-view-id>
		<navigation-case>
			<from-outcome>timepresidente</from-outcome>
			<to-view-id>/time/timepresidente.jsp</to-view-id>
			<redirect></redirect>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/time/timepresidente.jsp</from-view-id>
		<navigation-case>
			<from-outcome>indexmain</from-outcome>
			<to-view-id>/indexmain.jsp</to-view-id>
			<redirect />
		</navigation-case>
		<navigation-case>
			<from-outcome>cadforum</from-outcome>
			<to-view-id>/cad/cadforum.jsp</to-view-id>
		</navigation-case>
		<navigation-case>
			<from-outcome>listaforum</from-outcome>
			<to-view-id>/time/listaforum.jsp</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/cad/cadforum.jsp</from-view-id>
		<navigation-case>
			<from-outcome>indexmain</from-outcome>
			<to-view-id>/indexmain.jsp</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/time/listaforum.jsp</from-view-id>
		<navigation-case>
			<from-outcome>indexmain</from-outcome>

			<to-view-id>/indexmain.jsp</to-view-id>
			<redirect />
		</navigation-case>
		<navigation-case>
			<from-outcome>forum</from-outcome>

			<to-view-id>/time/forum.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<from-view-id>/time/forum.jsp</from-view-id>
		<navigation-case>
			<from-outcome>indexmain</from-outcome>

			<to-view-id>/indexmain.jsp</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
</faces-config>
vanilton.coelho

Qual destes não funciona ???

vanilton.coelho

mostre o código que retorna a string.

D

Antes estava só trabalhando com RichFaces e estava funcioanndo perfeitamente. Jar do meu projeto … tem algumas outras mas estas foi as que tive q colocar para funcionar os dois juntos

commons-beanutils-1.7.0
commons-codec-1.3
commons-collections-3.2
commons-digester-1.8
commons-discovery-0.4
commons-el
commons-fileupload-1.2.1
commons-lang-2.4
commons-logging-1.1.1
myfaces-api-1.2.3
myfaces-impl-1.2.3
postgresql-8.3-603.jdbc2
richfaces-api-3.2.1.GA
richfaces-impl-3.2.1.GA
richfaces-ui-3.2.1.GA
tomahawk-1.1.6
jsf-api
jsf-impl

D

Exemplo no CLIENT

<h:commandButton value="Cadastrar Time" action="cadtime"></h:commandButton>

Exemplo no SERVER

public String Save() {
		        ...		
			
			transaction.commit();						
			
			return "menumain";
                     
                        ...
        }

Nenhum dos dois está funcionando após a integração do RichFaces e MyFaces, antes estava. Tenho quase certeza que seja problema de compatiblidades dos jars dos frameworks

Z

Tenta fazer assim só como teste:

<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>indexmain</from-outcome>
<to-view-id>/indexmain.jsp</to-view-id>
</navigation-case>

Só pra ver se funfa.

[]`s

D

Cara simplesmente não vai.

Já procurei muito pela net e não encontrei nenhuma resposta. Se alguém conseguiu fazer funcionar estes frameworks nestas versões pro favor me falem como

Abraço

Criado 25 de agosto de 2008
Ultima resposta 25 de ago. de 2008
Respostas 8
Participantes 3