Hello Matthias,

As far as I know, there's no jsr-252 issue related to the new prependId
feature in jira,

Since you fixed it, I'm planning to create one and mark as resolved then.

Cagatay

On 3/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Author: mbr
Date: Fri Mar 16 02:48:49 2007
New Revision: 518906

URL: http://svn.apache.org/viewvc?view=rev&rev=518906
Log:
implement property prependId and getContainerClientId

Modified:

    
myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UIForm.java

Modified:
myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UIForm.java
URL:
http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UIForm.java?view=diff&rev=518906&r1=518905&r2=518906

==============================================================================
---
myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UIForm.java
(original)
+++
myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UIForm.java
Fri Mar 16 02:48:49 2007
@@ -34,6 +34,8 @@

     private boolean _submitted;

+    private Boolean _prependId;
+
     public boolean isSubmitted()
     {
         return _submitted;
@@ -117,17 +119,26 @@

     public String getContainerClientId(FacesContext ctx)
     {
-        throw new UnsupportedOperationException("1.2");
+        if (isPrependId())
+        {
+            return super.getContainerClientId(ctx);
+        }
+        UIComponent parentNamingContainer =
_ComponentUtils.findParentNamingContainer(this, false);
+        if (parentNamingContainer != null)
+        {
+            return parentNamingContainer.getContainerClientId(ctx);
+        }
+        return null;
     }

     public boolean isPrependId()
     {
-        throw new UnsupportedOperationException("1.2");
+        return getExpressionValue("prependId", _prependId, true);
     }

     public void setPrependId(boolean prependId)
     {
-        throw new UnsupportedOperationException("1.2");
+        _prependId = prependId;
     }

}



Reply via email to