You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2007/01/31 10:54:03 UTC
svn commit: r501785 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java
Author: weber
Date: Wed Jan 31 01:54:03 2007
New Revision: 501785
URL: http://svn.apache.org/viewvc?view=rev&rev=501785
Log:
TOBAGO-262 (descendants of button with immediate=true can't be immediate=false)
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java?view=diff&rev=501785&r1=501784&r2=501785
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java Wed Jan 31 01:54:03 2007
@@ -22,10 +22,15 @@
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_RENDERED_PARTIALLY;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TARGET;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TRANSITION;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
import java.io.IOException;
import java.util.Iterator;
@@ -183,6 +188,18 @@
public void encodeChildren(FacesContext facesContext) throws IOException {
if (isRendered()) {
UILayout.getLayout(this).encodeChildrenOfComponent(facesContext, this);
+ }
+ }
+
+ public void queueEvent(FacesEvent facesEvent) {
+ // fix for TOBAGO-262
+ super.queueEvent(facesEvent);
+ if (this == facesEvent.getSource()) {
+ if (isImmediate()) {
+ facesEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ facesEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
}
}
}