Permalink
Browse files

MYFACES-3668 CLONE - UIForm.createUniqueId should take into account p…

…rependId logic (only add unique id from viewRoot if a seed is not provided)

git-svn-id: https://svn.apache.org/repos/asf/myfaces/core/trunk@1425017 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 9b9cb50 commit 7fd0053ede4fc62bcff0956756e5302e8187460f Leonardo Uribe committed Dec 21, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 api/src/main/java/javax/faces/component/UIForm.java
@@ -55,7 +55,11 @@ public String createUniqueId(FacesContext context, String seed)
{
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);

0 comments on commit 7fd0053

Please sign in to comment.