You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Caroline Jen <ji...@yahoo.com> on 2005/10/06 16:08:24 UTC

The Navigation Did Not Happen! The Original Web Page is Redisplayed.

I do not understand why my web page does not navigate
to the next web page.

My web page "screen1" has a command button and it has
an "action" attribute.  
[code]
action="#{fileManagementBean.displaySelectedFiles}"
[/code]
The action invokes a method in the backing bean and
the method returns a String:
[code]
	public String displaySelectedFiles() 
	{
		int length = dataFile.length;
		for( int i=0; i<length; i++ ) 
		{
			selectedDataFiles.add( ( SelectItem )dataFile[i] );
		}

		return "success";
	}
[/code]
where dataFile is SelectItem[] and selectedDataFiles
is a List.

In my faces-config.xml, I have specified the
navigation rule:
[code]
 <navigation-rule>
  <from-view-id>/pages/screen1.jsp</from-view-id>
  <navigation-case>
   <from-outcome>success</from-outcome>
   <to-view-id>/pages/screen2.jsp</to-view-id>
  </navigation-case>
 </navigation-rule>
[/code]
Both screen1.jsp and screen2.jsp are in the "pages" folder.


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

Re: The Navigation Did Not Happen! The Original Web Page is Redisplayed.

Posted by Udo Schnurpfeil <ud...@atanion.com>.
Does the navigation works without backing-bean-call: action="success"?

Do your have only one f:page tag per page? (Last time I've seen that 
navigation problem, this was the error ;-))

Try to omit the from-view-id for testing purpose.

Regards,

Udo

Caroline Jen wrote:

> I do not understand why my web page does not navigate
> to the next web page.
> 
> My web page "screen1" has a command button and it has
> an "action" attribute.  
> [code]
> action="#{fileManagementBean.displaySelectedFiles}"
> [/code]
> The action invokes a method in the backing bean and
> the method returns a String:
> [code]
> 	public String displaySelectedFiles() 
> 	{
> 		int length = dataFile.length;
> 		for( int i=0; i<length; i++ ) 
> 		{
> 			selectedDataFiles.add( ( SelectItem )dataFile[i] );
> 		}
> 
> 		return "success";
> 	}
> [/code]
> where dataFile is SelectItem[] and selectedDataFiles
> is a List.
> 
> In my faces-config.xml, I have specified the
> navigation rule:
> [code]
>  <navigation-rule>
>   <from-view-id>/pages/screen1.jsp</from-view-id>
>   <navigation-case>
>    <from-outcome>success</from-outcome>
>    <to-view-id>/pages/screen2.jsp</to-view-id>
>   </navigation-case>
>  </navigation-rule>
> [/code]
> Both screen1.jsp and screen2.jsp are in the "pages" folder.
> 
>