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/06/19 23:16:07 UTC

svn commit: r669698 - /myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm

Author: lu4242
Date: Thu Jun 19 14:16:06 2008
New Revision: 669698

URL: http://svn.apache.org/viewvc?rev=669698&view=rev
Log:
add String[] case

Modified:
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm

Modified: myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm?rev=669698&r1=669697&r2=669698&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm (original)
+++ myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm Thu Jun 19 14:16:06 2008
@@ -122,6 +122,17 @@
                     validator.${utils.getPrefixedPropertyName("set",$property.name)}(
                         ($property.className)  ${field}Value.toString());                
                 }
+#elseif ($property.className == "java.lang.String[]")
+                try
+                {
+                    String[] value = org.apache.myfaces.commons.util.TagUtils.getStringArray(${field}.getValue(facesContext.getELContext()));
+                    validator.${utils.getPrefixedPropertyName("set",$property.name)}(value);
+                }
+                catch (java.text.ParseException pe)
+                {
+                  throw new JspException(
+                    pe.getMessage() + ": " + "Position " + pe.getErrorOffset());
+                }
 #else
                 validator.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className)  ${field}.getValue(facesContext.getELContext()));
 #end