You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/03/31 15:44:08 UTC

DO NOT REPLY [Bug 39171] New: - commons validitor throws exception with float and double.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39171

           Summary: commons validitor throws exception with float and
                    double.
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: mark.shifman@yale.edu


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 39171] - commons validitor throws exception with float and double.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39171


gvanmatre@comcast.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From gvanmatre@comcast.net  2006-04-06 03:50 -------
A fix for the methodParms is in the 20060406 shale nightly build.  The missing 
rules will be addressed with ticket 39121.  
http://issues.apache.org/bugzilla/show_bug.cgi?id=39121.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org