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 2010/11/13 19:50:03 UTC

svn commit: r1034845 - /myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm

Author: lu4242
Date: Sat Nov 13 18:50:03 2010
New Revision: 1034845

URL: http://svn.apache.org/viewvc?rev=1034845&view=rev
Log:
fix properties with Class type only should be evaluated at build time

Modified:
    myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm

Modified: myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm?rev=1034845&r1=1034844&r2=1034845&view=diff
==============================================================================
--- myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm (original)
+++ myfaces/commons/trunk/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm Sat Nov 13 18:50:03 2010
@@ -78,7 +78,26 @@ public class $utils.getClassFromFullClas
         if ($field != null)
         {
 #if ($converter.isEvaluateELOnExecution() && !($property.isLiteralOnly()))
+#if ($utils.getClassFromFullClass($property.className) == "Class")
+            if (${field}.isLiteralText())
+            {
+                try
+                {
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                    org.apache.myfaces.commons.util.ClassUtils.classForName(${field}.getExpressionString()));
+                }
+                catch (ClassNotFoundException e)
+                {
+                    throw new JspException(e);
+                }
+            }
+            else
+            {
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className) ${field}.getValue(elContext));
+            }
+#else
             converter.setValueExpression("$property.name", $field);
+#end
 #else
             if (${field}.isLiteralText())
             {