You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/03/19 07:59:34 UTC
svn commit: r638731 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java
Author: bommel
Date: Tue Mar 18 23:59:33 2008
New Revision: 638731
URL: http://svn.apache.org/viewvc?rev=638731&view=rev
Log:
(TOBAGO-637) Generate Components, JSP Tags from annotations
invokeOnComponent
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java?rev=638731&r1=638730&r2=638731&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIForm.java Tue Mar 18 23:59:33 2008
@@ -19,12 +19,19 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.tobago.compat.FacesUtils;
+import org.apache.myfaces.tobago.compat.InvokeOnComponent;
+import org.apache.myfaces.tobago.util.TobagoCallback;
import javax.faces.component.UIComponent;
+import javax.faces.component.ContextCallback;
import javax.faces.context.FacesContext;
+import javax.faces.FacesException;
+import javax.faces.event.PhaseId;
import java.util.Iterator;
-public class UIForm extends javax.faces.component.UIForm {
+
+public class UIForm extends javax.faces.component.UIForm implements InvokeOnComponent {
private static final Log LOG = LogFactory.getLog(UIForm.class);
@@ -90,5 +97,17 @@
kid.processUpdates(facesContext);
}
}
+ }
+
+ public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback)
+ throws FacesException {
+ // TODO is this needed?
+ if (callback instanceof TobagoCallback) {
+ if (PhaseId.APPLY_REQUEST_VALUES.equals(((TobagoCallback) callback).getPhaseId())) {
+ decode(context);
+ }
+ }
+ context.getExternalContext().getRequestMap().put(UIForm.SUBMITTED_MARKER, isSubmitted());
+ return FacesUtils.invokeOnComponent(context, this, clientId, callback);
}
}