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:20 UTC
svn commit: r1034846 -
/myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm
Author: lu4242
Date: Sat Nov 13 18:50:20 2010
New Revision: 1034846
URL: http://svn.apache.org/viewvc?rev=1034846&view=rev
Log:
fix properties with Class type only should be evaluated at build time
Modified:
myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm?rev=1034846&r1=1034845&r2=1034846&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-converters/src/main/resources/META-INF/tagConverterClass12.vm Sat Nov 13 18:50:20 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())
{