myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r392868 - /myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java
Date Mon, 10 Apr 2006 01:25:38 GMT
Author: schof
Date: Sun Apr  9 18:25:37 2006
New Revision: 392868

URL: http://svn.apache.org/viewcvs?rev=392868&view=rev
Log:
Reverted fix related to MYFACES-765.  Fix caused massive problems with the TCK.  Revisit this
after the 1.1.2 release.

Modified:
    myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java

Modified: myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java
URL: http://svn.apache.org/viewcvs/myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java?rev=392868&r1=392867&r2=392868&view=diff
==============================================================================
--- myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java
(original)
+++ myfaces/core/branches/1_1_2/api/src/main/java/javax/faces/component/_ComponentChildrenList.java
Sun Apr  9 18:25:37 2006
@@ -50,20 +50,6 @@
     public Object set(int index, Object value)
     {
         checkValue(value);
-
-        UIComponent newChild = (UIComponent) value;
-
-        for (int i = 0; i < _list.size(); i++)
-        {
-            UIComponent component = (UIComponent) _list.get(i);
-            if(component.getId()!=null && component.getId().equals(newChild.getId()))
-            {
-                if(i!=index)
-                    throw new IllegalStateException(
-                        "Duplicate id : "+newChild.getId()+". Child could not be added.");
-            }
-        }
-        
         setNewParent((UIComponent)value);
         UIComponent child = (UIComponent) _list.set(index, value);
         if (child != null) child.setParent(null);
@@ -73,7 +59,6 @@
     public boolean add(Object value)
     {
         checkValue(value);
-        checkAddAllowed((UIComponent) value);
         setNewParent((UIComponent)value);
         return _list.add(value);
     }
@@ -81,21 +66,10 @@
     public void add(int index, Object value)
     {
         checkValue(value);
-        checkAddAllowed((UIComponent) value);
         setNewParent((UIComponent)value);
         _list.add(index, value);
     }
 
-    private void checkAddAllowed(UIComponent newChild)
-    {
-        for (int i = 0; i < _list.size(); i++)
-        {
-            UIComponent component = (UIComponent) _list.get(i);
-            if(component.getId()!=null && component.getId().equals(newChild.getId()))
-                throw new IllegalStateException("Duplicate id : "+newChild.getId()+". Child
could not be added.");
-        }
-    }
-
     public Object remove(int index)
     {
         UIComponent child = (UIComponent) _list.remove(index);
@@ -119,7 +93,5 @@
         if (value == null) throw new NullPointerException("value");
         if (!(value instanceof UIComponent)) throw new ClassCastException("value is not a
UIComponent");
     }
-
-
 
 }



Mime
View raw message