You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by or...@apache.org on 2005/09/07 03:08:16 UTC
svn commit: r279199 -
/myfaces/impl/trunk/src/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java
Author: oros
Date: Tue Sep 6 18:08:11 2005
New Revision: 279199
URL: http://svn.apache.org/viewcvs?rev=279199&view=rev
Log:
MYFACES-509: throw IllegalStateException for duplicate ids
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=279199&r1=279198&r2=279199&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 18:08:11 2005
@@ -232,12 +232,12 @@
}
private static void checkForDuplicateIds(UIComponent component,
- FacesContext facesContext, Set clientIds)
+ FacesContext facesContext, Set ids)
{
- String clientId = component.getClientId(facesContext);
- if(clientId != null && !clientIds.add(clientId))
+ String id = component.getId();
+ if(id != null && !ids.add(id))
{
- throw new IllegalArgumentException("ClientId : "+clientId+
+ throw new IllegalStateException("Id : "+id+
" is duplicated in the faces tree.");
}
else
@@ -246,7 +246,7 @@
while (it.hasNext())
{
UIComponent kid = (UIComponent) it.next();
- checkForDuplicateIds(kid, facesContext, clientIds);
+ checkForDuplicateIds(kid, facesContext, ids);
}
}
}