Thank you Jishnu.

This looks like complicated solution to me, could I just change locale for
that jsp or textfield ?

--
Thx, Milan


Jishnu Viswanath wrote:
> 
> AJAX validation is done through js, before that we can have our own
> client side validation. 
> Since your's is an easy client side validation we can do something like
> this.
> 
> If its not something you wanted mail back.
> 
> <s:textarea name="dummy.value" id="someId" onblur="roundOf('someId')"
> cssStyle="width:100%;"/>
> 
> <script type="text/javascript">
>             function roundOf(/*id Of the widget*/someId) {
>                 var inputValue = document.getElementById(someId).value;
>                 //TODO: I am putting basic validation only the rest is
> upto you
>                 var result = Math.round((inputValue.replace(',', ".")) *
> 100) / 100;
>                 document.getElementById(someId).value=
> (result+"").replace('.', ",");
>                 
> 
>             }
>         </script>
> 
> Regards,
> 
> Jishnu Viswanath
> 
> Software Engineer
> 
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
> 
> Tavant Technologies Inc.,
> 
> www.tavant.com
> 
> PEOPLE :: PASSION :: EXCELLENCE
> 
> 
> -----Original Message-----
> From: Milan Milanovic [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 23, 2008 3:34 PM
> To: user@struts.apache.org
> Subject: RE: [s2] Formatting input textfields
> 
> 
> Hi Jishnu,
> 
> well, I'm not sure what to do with ajax validation on jsp page, because
> my
> BigDecimal field in my action class wouldn't accept it ?
> 
> I need one another thing, that my number be rounded on exactly two
> decimals,
> like: 198,19833 to 198,20 ?
> 
> 
> --
> Thx, Milan
> 
> 
> Jishnu Viswanath wrote:
>> 
>> http://cwiki.apache.org/WW/ajax-validation.html
>> On the validate part, do put Regular expression to make to accept the
>> pattern you want. 
>> 
>> Regards,
>> 
>> Jishnu Viswanath
>> 
>> Software Engineer
>> 
>> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>> 
>> Tavant Technologies Inc.,
>> 
>> www.tavant.com
>> 
>> PEOPLE :: PASSION :: EXCELLENCE
>> 
>> 
>> -----Original Message-----
>> From: Milan Milanovic [mailto:[EMAIL PROTECTED] 
>> Sent: Tuesday, July 22, 2008 10:32 PM
>> To: user@struts.apache.org
>> Subject: [s2] Formatting input textfields
>> 
>> 
>> Hi,
>> 
>> I need to format input in textfields that user can enter value like
>> this:
>> 204,05, but now it is like this 204.05.
>> I have defined this formatting for output already. How can I change
> this
>> ?
>> 
>> --
>> Thx, Milan
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p185939
>> 85.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> Any comments or statements made in this email are not necessarily
> those of
>> Tavant Technologies.
>> The information transmitted is intended only for the person or entity
> to
>> which it is addressed and may 
>> contain confidential and/or privileged material. If you have received
> this
>> in error, please contact the 
>> sender and delete the material from any computer. All e-mails sent
> from or
>> to Tavant Technologies 
>> may be subject to our monitoring procedures.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p186074
> 97.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Any comments or statements made in this email are not necessarily those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity to
> which it is addressed and may 
> contain confidential and/or privileged material. If you have received this
> in error, please contact the 
> sender and delete the material from any computer. All e-mails sent from or
> to Tavant Technologies 
> may be subject to our monitoring procedures.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p18611055.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to