You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2007/10/12 22:01:42 UTC
svn commit: r584253 -
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
Author: mmarinschek
Date: Fri Oct 12 13:01:42 2007
New Revision: 584253
URL: http://svn.apache.org/viewvc?rev=584253&view=rev
Log:
fix for https://issues.apache.org/jira/browse/MYFACES-1733 (MYFACES-1733): [Seam] Server-side state saving not working correctly. thanks to Michael Kurz for looking into this.
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java?rev=584253&r1=584252&r2=584253&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java Fri Oct 12 13:01:42 2007
@@ -88,7 +88,7 @@
facesContext.setViewRoot(viewRoot);
- if (facesContext.getExternalContext().getRequestParameterMap().isEmpty()) {
+ if (!isPostback(facesContext)) {
// no POST or query parameters --> set render response flag
facesContext.renderResponse();
}
@@ -96,6 +96,19 @@
RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(facesContext, viewRoot);
return false;
}
+
+
+ /**
+ * Return <code>true</code> if the current request is a post back and
+ * <code>false</code> otherwise.
+ *
+ * @param facesContext the current faces context
+ * @return <code>true</code> if the current request is a post back and
+ * <code>false</code> otherwise
+ */
+ private boolean isPostback(FacesContext facesContext) {
+ return facesContext.getExternalContext().getRequestParameterMap().containsKey(HtmlResponseStateManager.STANDARD_STATE_SAVING_PARAM);
+ }
public PhaseId getPhase() {
return PhaseId.RESTORE_VIEW;