[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Sun Dec 17 20:46:24 EST 2006
User: gavin
Date: 06/12/17 20:46:24
Modified: src/main/org/jboss/seam/core Manager.java
Log:
add s:forceModelUpdate
Revision Changes Path
1.128 +27 -1 jboss-seam/src/main/org/jboss/seam/core/Manager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Manager.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Manager.java,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- Manager.java 17 Dec 2006 19:46:41 -0000 1.127
+++ Manager.java 18 Dec 2006 01:46:24 -0000 1.128
@@ -20,6 +20,7 @@
import javax.faces.application.FacesMessage;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
import javax.faces.event.PhaseId;
import org.jboss.seam.log.LogProvider;
@@ -42,7 +43,7 @@
*
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.127 $
+ * @version $Revision: 1.128 $
*/
@Scope(ScopeType.EVENT)
@Name("org.jboss.seam.core.manager")
@@ -1122,4 +1123,29 @@
this.parentConversationIdParameter = nestedConversationIdParameter;
}
+ private boolean forceModelUpdate;
+ private MethodBinding validationFailedAction;
+
+ public void setValidationFailedAction(MethodBinding action)
+ {
+ validationFailedAction = action;
+ }
+
+ public void setForceModelUpdate()
+ {
+ forceModelUpdate = true;
+ }
+
+ public void afterValidationFailure(FacesContext ctx)
+ {
+ if (forceModelUpdate)
+ {
+ ctx.getViewRoot().processUpdates(ctx);
+ }
+ if (validationFailedAction!=null)
+ {
+ validationFailedAction.invoke(ctx, null);
+ }
+ }
+
}
More information about the jboss-cvs-commits
mailing list