[jboss-cvs] jboss-seam/src/main/org/jboss/seam/jsf ...
Gavin King
gavin.king at jboss.com
Sat Dec 16 19:25:14 EST 2006
User: gavin
Date: 06/12/16 19:25:14
Modified: src/main/org/jboss/seam/jsf SeamNavigationHandler.java
Log:
JBSEAM-605, navigation in pages.xml
make s:link action trigger navigation even if outcome is null (but not page actions)
Revision Changes Path
1.17 +8 -3 jboss-seam/src/main/org/jboss/seam/jsf/SeamNavigationHandler.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamNavigationHandler.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/jsf/SeamNavigationHandler.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- SeamNavigationHandler.java 31 Oct 2006 20:09:22 -0000 1.16
+++ SeamNavigationHandler.java 17 Dec 2006 00:25:14 -0000 1.17
@@ -6,6 +6,7 @@
import org.jboss.seam.core.Init;
import org.jboss.seam.core.Manager;
import org.jboss.seam.core.Pageflow;
+import org.jboss.seam.core.Pages;
public class SeamNavigationHandler extends NavigationHandler {
@@ -20,8 +21,7 @@
public void handleNavigation(FacesContext context, String fromAction, String outcome) {
if ( !context.getResponseComplete() ) //workaround for a bug in MyFaces
{
- boolean outcomeIsViewId = outcome!=null && outcome.startsWith("/");
- if ( outcomeIsViewId )
+ if ( isOutcomeViewId(outcome) )
{
Manager.instance().interpolateAndRedirect(outcome);
}
@@ -29,11 +29,16 @@
{
Pageflow.instance().navigate(context, outcome);
}
- else
+ else if ( !Pages.instance().navigate(context, fromAction, outcome) )
{
baseNavigationHandler.handleNavigation(context, fromAction, outcome);
}
}
}
+ private static boolean isOutcomeViewId(String outcome)
+ {
+ return outcome!=null && outcome.startsWith("/");
+ }
+
}
More information about the jboss-cvs-commits
mailing list