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 2008/11/29 01:03:36 UTC

svn commit: r721588 - in /myfaces/core/trunk_1.2.x: api/src/main/java/javax/faces/component/ impl/src/main/resources/META-INF/

Author: lu4242
Date: Fri Nov 28 16:03:35 2008
New Revision: 721588

URL: http://svn.apache.org/viewvc?rev=721588&view=rev
Log:
MYFACES-2082 id attribute for html components on JSF 1.2 could be set via an rtexprvalue (but not by a ValueExpression)

Modified:
    myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIColumn.java
    myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIComponentBase.java
    myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_core12.vm
    myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_html12.vm

Modified: myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIColumn.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIColumn.java?rev=721588&r1=721587&r2=721588&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIColumn.java (original)
+++ myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIColumn.java Fri Nov 28 16:03:35 2008
@@ -20,6 +20,7 @@
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFacet;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
 /**
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
  *
@@ -55,6 +56,16 @@
         return getFacet(HEADER_FACET_NAME);
     }
 
+    /**
+     * Get a string which uniquely identifies this UIComponent within the scope of the nearest ancestor NamingContainer
+     * component. The id is not necessarily unique across all components in the current view.
+     */
+    @JSFProperty(literalOnly=true, rtexprvalue=false)
+    @Override
+    public String getId()
+    {
+        return super.getId();
+    }
 
     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
 

Modified: myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=721588&r1=721587&r2=721588&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/UIComponentBase.java Fri Nov 28 16:03:35 2008
@@ -279,7 +279,7 @@
      * component. The id is not necessarily unique across all components in the current view.
      */
     @JSFProperty
-      (literalOnly = true)
+      (rtexprvalue = true)
     public String getId()
     {
         return _id;

Modified: myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_core12.vm
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_core12.vm?rev=721588&r1=721587&r2=721588&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_core12.vm (original)
+++ myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_core12.vm Fri Nov 28 16:03:35 2008
@@ -77,6 +77,7 @@
 #elseif ($property.isLiteralOnly())
          <rtexprvalue>false</rtexprvalue>
 #else
+#if ( "$!property.isRtexprvalue()" == "")
 #set ($type = $utils.getClassFromFullClass($property.className))
 #if ($type == "String")
          <deferred-value></deferred-value>
@@ -89,6 +90,9 @@
              <type>$property.className</type>
          </deferred-value>
 #end
+#else
+         <rtexprvalue>$property.isRtexprvalue().booleanValue()</rtexprvalue>
+#end
 #end
       </attribute>
 #end

Modified: myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_html12.vm
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_html12.vm?rev=721588&r1=721587&r2=721588&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_html12.vm (original)
+++ myfaces/core/trunk_1.2.x/impl/src/main/resources/META-INF/myfaces_html12.vm Fri Nov 28 16:03:35 2008
@@ -77,6 +77,7 @@
 #elseif ($property.isLiteralOnly())
          <rtexprvalue>false</rtexprvalue>
 #else
+#if ( "$!property.isRtexprvalue()" == "")
 #set ($type = $utils.getClassFromFullClass($property.className))
 #if ($type == "String")
          <deferred-value></deferred-value>
@@ -85,6 +86,9 @@
              <type>$property.className</type>
          </deferred-value>
 #end
+#else
+         <rtexprvalue>$property.isRtexprvalue().booleanValue()</rtexprvalue>
+#end
 #end
       </attribute>
 #end