You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mb...@apache.org on 2005/09/06 22:54:15 UTC

svn commit: r279101 - /myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java

Author: mbr
Date: Tue Sep  6 13:54:12 2005
New Revision: 279101

URL: http://svn.apache.org/viewcvs?rev=279101&view=rev
Log:
see MYFACES-509
checking non null component ids instead of clientIds
removing complains for an unassigned id on every page

Modified:
    myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java

Modified: myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java?rev=279101&r1=279100&r2=279101&view=diff
==============================================================================
--- myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java (original)
+++ myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java Tue Sep  6 13:54:12 2005
@@ -38,9 +38,6 @@
 /**
  * Default StateManager implementation.
  * @author Thomas Spiegl (latest modification by $Author$)
- * @version $Revision$ $Date$
- *
- * @author Thomas Spiegl (latest modification by $Author$)
  * @author Manfred Geiler
  * @version $Revision$ $Date$
  */
@@ -235,13 +232,12 @@
     }
 
     private static void checkForDuplicateIds(UIComponent component,
-                                             FacesContext facesContext, Set clientIds)
+                                             FacesContext facesContext, Set ids)
     {
-        String clientId = component.getClientId(facesContext);
-
-        if(!clientIds.add(clientId))
+        String id = component.getId();
+        if(id != null && !ids.add(id))
         {
-            throw new IllegalArgumentException("ClientId : "+clientId+
+            throw new IllegalArgumentException("Id : "+id+
                     " is duplicated in the faces tree.");
         }
         else
@@ -250,7 +246,7 @@
             while (it.hasNext())
             {
                 UIComponent kid = (UIComponent) it.next();
-                checkForDuplicateIds(kid, facesContext, clientIds);
+                checkForDuplicateIds(kid, facesContext, ids);
             }
         }
     }