[jboss-cvs] jboss-seam/src/main/org/jboss/seam/navigation ...
Norman Richards
norman.richards at jboss.com
Thu Aug 2 15:08:12 EDT 2007
User: nrichards
Date: 07/08/02 15:08:12
Modified: src/main/org/jboss/seam/navigation Pages.java
Log:
JBSEAM-1574
Revision Changes Path
1.12 +23 -11 jboss-seam/src/main/org/jboss/seam/navigation/Pages.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Pages.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/navigation/Pages.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- Pages.java 25 Jul 2007 14:40:31 -0000 1.11
+++ Pages.java 2 Aug 2007 19:08:12 -0000 1.12
@@ -286,17 +286,29 @@
}
}
+ boolean result = callAction(facesContext);
+
+ //If responseComplete then we're probably doing a redirect so don't call the page actions now.
+ if (!facesContext.getResponseComplete()) {
+ String newViewId = getViewId(facesContext);
+
+ for ( Page page: getPageStack(newViewId) ) {
+ if ( isNoConversationRedirectRequired(page) ) {
+ redirectToNoConversationView();
+ return false;
+ } else if ( isLoginRedirectRequired(newViewId, page) ) {
+ redirectToLoginView();
+ return false;
+ }
+ }
+
//run the page actions, check permissions,
//handle conversation begin/end
- boolean result = false;
- for ( Page page: pageStack )
- {
+
+ for ( Page page: getPageStack(newViewId) ) {
result = page.preRender(facesContext) || result;
}
-
- //run the s:link / s:button action after checking the
- //conversation existence!
- result = callAction(facesContext) || result;
+ }
return result;
}
More information about the jboss-cvs-commits
mailing list