You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ja...@apache.org on 2010/05/11 14:20:37 UTC

svn commit: r943097 - /myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java

Author: jakobk
Date: Tue May 11 12:20:37 2010
New Revision: 943097

URL: http://svn.apache.org/viewvc?rev=943097&view=rev
Log:
MYFACES-2676 Include the whole component tree with all real values in the debug page (removed EL wrapper from UIInput)

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java?rev=943097&r1=943096&r2=943097&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java Tue May 11 12:20:37 2010
@@ -25,7 +25,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.el.ELContext;
 import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.application.FacesMessage;
@@ -557,22 +556,6 @@ public class UIInput extends UIOutput im
         setValid(true);
     }
     
-    @Override
-    public ValueExpression getValueExpression(String name) 
-    {
-        // override this method to be able to install a _DebugValueExpressionWrapper
-        
-        ValueExpression valueExpression = super.getValueExpression(name);
-        if (valueExpression != null 
-                && getFacesContext().isProjectStage(ProjectStage.Development)
-                && "value".equals(name))
-        {
-            // use a _DebugValueExpressionWrapper for debugging of the value-ValueExpression
-            valueExpression = new _DebugValueExpressionWrapper(valueExpression);
-        }
-        return valueExpression;
-    }
-    
     /**
      * A boolean value that identifies the phase during which action events should fire.
      * <p>
@@ -1093,84 +1076,5 @@ public class UIInput extends UIOutput im
         }
         return false;
     }
-    
-    /**
-     * This ValueExpression wrapper is installed for debugging reasons when
-     * in Development mode. Every call to setValue() will be forwarded
-     * to _createFieldDebugInfo() in order to create debugging infos.
-     *
-     * @author Jakob Korherr
-     */
-    private class _DebugValueExpressionWrapper extends ValueExpression
-    {
-        
-        private static final long serialVersionUID = -7114362926319263354L;
-        
-        private ValueExpression _wrapped;
-        
-        _DebugValueExpressionWrapper(ValueExpression wrapped)
-        {
-            _wrapped = wrapped;
-        }
-        
-        @Override
-        public Class<?> getExpectedType()
-        {
-            return _wrapped.getExpectedType();
-        }
-
-        @Override
-        public Class<?> getType(ELContext ctx)
-        {
-            return _wrapped.getType(ctx);
-        }
-
-        @Override
-        public Object getValue(ELContext ctx)
-        {
-            return _wrapped.getValue(ctx);
-        }
-
-        @Override
-        public boolean isReadOnly(ELContext ctx)
-        {
-            return _wrapped.isReadOnly(ctx);
-        }
-
-        @Override
-        public void setValue(ELContext ctx, Object value)
-        {
-            // create debug info for this call to setValue
-            _createFieldDebugInfo((FacesContext) ctx.getContext(FacesContext.class),
-                    "value", _wrapped.getValue(ctx), value, 2);
-            
-            _wrapped.setValue(ctx, value);
-        }
-
-        @Override
-        public boolean equals(Object o)
-        {
-            return _wrapped.equals(o);
-        }
-
-        @Override
-        public String getExpressionString()
-        {
-            return _wrapped.getExpressionString();
-        }
-
-        @Override
-        public int hashCode()
-        {
-            return _wrapped.hashCode();
-        }
-
-        @Override
-        public boolean isLiteralText()
-        {
-            return _wrapped.isLiteralText();
-        }
-
-    }
 
 }