[seam-commits] Seam SVN: r10613 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 23 12:04:25 EDT 2009
Author: manaRH
Date: 2009-04-23 12:04:24 -0400 (Thu, 23 Apr 2009)
New Revision: 10613
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Redirect.java
Log:
JBPAPP-1920
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Redirect.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Redirect.java 2009-04-23 15:25:30 UTC (rev 10612)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Redirect.java 2009-04-23 16:04:24 UTC (rev 10613)
@@ -94,17 +94,24 @@
}
/**
- * Capture the view id and page parameters from the
- * current request and squirrel them away so we can
- * return here later in the conversation. If no
- * conversation is active, begin a conversation.
+ * Capture the view id, request parameters and page parameters (which take
+ * precedence) from the current request and squirrel them away so we can
+ * return here later in the conversation. If no conversation is active, begin
+ * a conversation. The conversation is terminated by
+ * {@link Redirect#returnToCapturedView()} if begun by this method.
*
* @see Redirect#returnToCapturedView()
*/
public void captureCurrentView()
{
FacesContext context = FacesContext.getCurrentInstance();
- parameters = Pages.instance().getStringValuesFromPageContext(context);
+ if ( context == null ) return;
+
+ // first capture all request parameters
+ parameters.putAll( context.getExternalContext().getRequestParameterMap() );
+ // then preserve page parameters, overwriting request parameters with same names
+ parameters.putAll( Pages.instance().getStringValuesFromPageContext(context) );
+
viewId = Pages.getViewId(context);
conversationBegun = Conversation.instance().begin(true, false);
setDirty();
More information about the seam-commits
mailing list