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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]