You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Craig McClanahan (JIRA)" <ji...@apache.org> on 2006/04/26 08:14:49 UTC
[jira] Moved: (SHALE-31) commons validitor throws exception with
float and double.
[ http://issues.apache.org/struts/browse/SHALE-31?page=all ]
Craig McClanahan moved STR-2818 to SHALE-31:
--------------------------------------------
Project: Shale (was: Struts Action 1)
Key: SHALE-31 (was: STR-2818)
Component: (was: Shale)
Version: (was: Nightly Build)
Assign To: (was: Struts Developer Mailing List)
> commons validitor throws exception with float and double.
> ---------------------------------------------------------
>
> Key: SHALE-31
> URL: http://issues.apache.org/struts/browse/SHALE-31
> Project: Shale
> Type: Bug
> Environment: Operating System: other
> Platform: All
> Reporter: Mark Shifman
>
> When using this component:
> <h:inputText id="s_id" size="16" value="#{su_menu.s_id}">
> <s:commonsValidator type="required" server="true" client="true"
> arg="#{msgs.validate_s_id}"/>
> <s:commonsValidator type="float" server="true" client="true"
> arg="#{msgs.validate_s_id}" />
> </h:inputText>
> An exception is thrown on submit.
> java.lang.NullPointerException
> at
> org.apache.shale.validator.CommonsValidator.validate(CommonsValidator.java:525)
> at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:133)
> at javax.faces.component.UIInput.validateValue(UIInput.java:254)
> at javax.faces.component.UIInput.validate(UIInput.java:269)
> Gary VanMatre pointed out a bug in
> http://svn.apache.org/viewcvs.cgi/struts/shale/trunk/core-library/src/conf/validator-rules.xml?view=markup
> The methodParams attribute should be "java.lang.String" not "double".
> The correct entry should be:
> <validator name="float"
> classname="org.apache.commons.validator.GenericValidator"
> method="isDouble"
> methodParams="java.lang.String"
> depends=""
> msg="errors.float"
> jsFunctionName="FloatValidations">
> I also noticed there is no entry for double in validation-rules.xml.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org