can someone help me with this? Thanks.

From: "fea jabi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: user@struts.apache.org
Subject: validating user entered values
Date: Fri, 17 Mar 2006 15:15:43 -0500

in strutsconfig.xml  the form bean attribute has
<form-property name="newBalance" type="java.lang.String"/>


Prepare jsp action
Form1.set("newBalance", "100000");



In jsp I have
<fmt:formatNumber value="${Form1.map.newBalance}" type="currency" currencySymbol="" var="newBal"/>
<html:text name="Form1" property="newBalance" value="${newBal}" />

Validator.xml has
<field property="newBalance" depends="double">
               <msg name="double" key="notvalid"/>
</field>


The Dispatch action has
DynaValidatorForm frm = (DynaValidatorForm)form;

ActionMessages messages = (ActionMessages)frm.validate( mapping, request );


when I try to submit  the page/jsp getting Exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: In &lt;formatNumber&gt;, value attribute can not be parsed into java.lang.Number: "100,000.00"

I understand that the String is entered i.e formbean has String value but validating if it's double value.

How to handle such data? user entering in String but have to validate if it's double?

Thanks.

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to