You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2012/12/21 17:46:55 UTC
svn commit: r1425016 -
/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java
Author: lu4242
Date: Fri Dec 21 16:46:55 2012
New Revision: 1425016
URL: http://svn.apache.org/viewvc?rev=1425016&view=rev
Log:
MYFACES-3668 CLONE - UIForm.createUniqueId should take into account prependId logic (only add unique id from viewRoot if a seed is not provided)
Modified:
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java?rev=1425016&r1=1425015&r2=1425016&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIForm.java Fri Dec 21 16:46:55 2012
@@ -56,7 +56,11 @@ public class UIForm extends UIComponentB
{
StringBuilder bld = null;
- if (!isPrependId())
+ // When prependId is set to false, it is necessary to append an unique
+ // prefix to ensure the generated ids are unique, but that's only necessary
+ // when no seed is provided. If a seed is provided, that one is already unique
+ // for all the view, so the following logic is not necessary.
+ if (!isPrependId() && seed==null )
{
bld = new StringBuilder();
UniqueIdVendor parentUniqueIdVendor = _ComponentUtils.findParentUniqueIdVendor(this);