Re: Restric the values in S:TextFields.

2008-02-27 Thread Jeromy Evans
On the server-side, use an expression validator to ensure the input contains only valid characters. On the client-side either: - use ajax validation; or - use a javascript function that listens for the keypress event and rejects invalid keystrokes As usual, the javascript keypress event on

RE: Restric the values in S:TextFields.

2008-02-27 Thread Sanjeewa Saman
Thank you very much Jeromy , It works I used the java Scripts for this to validate in client side. sanjeewa -Original Message- From: Jeromy Evans [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 1:44 PM To: Struts Users Mailing List Subject: Re: Restric the values

Re: Restric the values in S:TextFields.

2008-02-27 Thread Jeromy Evans
Sanjeewa Saman wrote: Thank you very much Jeromy , It works I used the java Scripts for this to validate in client side. You're welcome. Depending on how important the data is and how public the site is, also consider validating it on the server-side in case of users without javascript

Restric the values in S:TextFields.

2008-02-26 Thread Sanjeewa Saman
Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do is , for the s:textfield , I need to enter only values these values {1-10 , +,-,.} . Thank you. sanjeewa

RE: Restric the values in S:TextFields.

2008-02-26 Thread Sanjeewa Saman
:29 PM To: Struts Users Mailing List Subject: Re: Restric the values in S:TextFields. On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED] wrote: Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do

Re: Restric the values in S:TextFields.

2008-02-26 Thread Chris Pratt
On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED] wrote: Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do is , for the s:textfield , I need to enter only values these values {1-10 , +,-,.}

Re: Restric the values in S:TextFields.

2008-02-26 Thread Laurie Harper
Chris Pratt wrote: On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED] wrote: Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do is , for the s:textfield , I need to enter only values these