You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2004/12/03 09:41:45 UTC
cvs commit: incubator-myfaces/src/myfaces/org/apache/myfaces/el PropertyResolverImpl.java
manolito 2004/12/03 00:41:45
Modified: src/myfaces/org/apache/myfaces/el PropertyResolverImpl.java
Log:
MYFACES-44 / PropertyResolverImpl has special logic for UIComponents
Revision Changes Path
1.30 +3 -44 incubator-myfaces/src/myfaces/org/apache/myfaces/el/PropertyResolverImpl.java
Index: PropertyResolverImpl.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/myfaces/org/apache/myfaces/el/PropertyResolverImpl.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- PropertyResolverImpl.java 13 Oct 2004 11:51:00 -0000 1.29
+++ PropertyResolverImpl.java 3 Dec 2004 08:41:45 -0000 1.30
@@ -19,7 +19,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.faces.component.UIComponent;
import javax.faces.el.EvaluationException;
import javax.faces.el.PropertyNotFoundException;
import javax.faces.el.PropertyResolver;
@@ -30,7 +29,6 @@
import java.beans.PropertyDescriptor;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -40,6 +38,9 @@
* @author Anton Koinov
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.30 2004/12/03 08:41:45 manolito
+ * MYFACES-44 / PropertyResolverImpl has special logic for UIComponents
+ *
* Revision 1.29 2004/10/13 11:51:00 matze
* renamed packages to org.apache
*
@@ -95,22 +96,6 @@
{
return ((Map) base).get(property);
}
- if (base instanceof UIComponent)
- {
- for (Iterator children =
- ((UIComponent) base).getChildren().iterator();
- children.hasNext();)
- {
- UIComponent child = (UIComponent) children.next();
-
- if (property.equals(child.getId()))
- {
- return child;
- }
- }
-
- return null;
- }
// If none of the special bean types, then process as normal Bean
return getProperty(base, property.toString());
@@ -144,10 +129,6 @@
{
return ((List) base).get(index);
}
- if (base instanceof UIComponent)
- {
- return ((UIComponent) base).getChildren().get(index);
- }
}
catch (IndexOutOfBoundsException e)
{
@@ -191,11 +172,6 @@
return;
}
- if (base instanceof UIComponent)
- {
- throw new PropertyNotFoundException(
- "Bean must not be UIComponent, property: " + property);
- }
// If none of the special bean types, then process as normal Bean
setProperty(base, property.toString(), newValue);
@@ -272,10 +248,6 @@
{
return false;
}
- if (base instanceof UIComponent)
- {
- return true;
- }
// If none of the special bean types, then process as normal Bean
PropertyDescriptor propertyDescriptor =
@@ -304,10 +276,6 @@
// Is there any way to determine whether List.set() will fail?
return false;
}
- if (base instanceof UIComponent)
- {
- return true;
- }
// Cannot determine read-only, return false (is this what the spec requires?)
return false;
@@ -337,10 +305,6 @@
// REVISIT: when generics are imlemented in JVM 1.5
return (value == null) ? Object.class : value.getClass();
}
- if (base instanceof UIComponent)
- {
- return UIComponent.class;
- }
// If none of the special bean types, then process as normal Bean
PropertyDescriptor propertyDescriptor =
@@ -379,11 +343,6 @@
// REVISIT: when generics are implemented in JVM 1.5
return (value != null) ? value.getClass() : Object.class;
- }
-
- if (base instanceof UIComponent)
- {
- return UIComponent.class;
}
// Cannot determine type, return null per JSF spec