Re: Trim all fields before validation

2005-09-02 Thread Joe Germuska
At 9:43 AM +1000 9/2/05, [EMAIL PROTECTED] wrote: On Wed, 2005-08-31 at 13:58 -0500, Joe Germuska wrote: You can't really intervene in the form population process on the Struts side right now (although arguably that's something which should be exposed for user customization better). We alre

Re: Trim all fields before validation

2005-09-01 Thread amos
On Wed, 2005-08-31 at 13:58 -0500, Joe Germuska wrote: > You can't really intervene in the form population process on the > Struts side right now (although arguably that's something which > should be exposed for user customization better). We already have a BaseProcessor class which extends Tile

Re: Trim all fields before validation

2005-09-01 Thread Frank W. Zammetti
r work in making it available. Dilip From: "Frank W. Zammetti" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List Subject: Re: Trim all fields before validation Date: Thu, 01 Sep 2005 14:57:36 -0400 The ParameterMungerFilter in JWP didn't do t

Re: Trim all fields before validation

2005-09-01 Thread Frank W. Zammetti
map.get(key); if (obj instanceof String){ obj = ((String) obj).trim(); } else if(obj instanceof String[]){ String[] temp = (String[]) obj; for(int i=0;i From: Kishore Senji <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re

Re: Trim all fields before validation

2005-09-01 Thread Dilip Ladhani
Users Mailing List Subject: Re: Trim all fields before validation Date: Thu, 01 Sep 2005 14:57:36 -0400 The ParameterMungerFilter in JWP didn't do the trick for you? I'd love to know what shortcomings you found so that I can work to improve it :) Frank Dilip Ladhani wrote: I am n

Re: Trim all fields before validation

2005-09-01 Thread Dilip Ladhani
;[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Trim all fields before validation Date: Thu, 1 Sep 2005 09:40:42 -0700 Wouldn't this be easier, without mucking with the form, to let this be handled by the validator its

Re: Trim all fields before validation

2005-09-01 Thread Kishore Senji
Wouldn't this be easier, without mucking with the form, to let this be handled by the validator itself. For any field validation you would just have to have the "requires" validation before you do any other validation, and that way you would take care of empty strings or as Joe said you could d

Re: Trim all fields before validation

2005-08-31 Thread Dilip Ladhani
Thanks Ed, I will give this a shot From: Ed Griebel <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Trim all fields before validation Date: Wed, 31 Aug 2005 16:13:56 -0400 I just checked the Struts source code, and ge

Re: Trim all fields before validation

2005-08-31 Thread Ed Griebel
nless I modify the > code, right? > > > >From: Ed Griebel <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: Struts Users Mailing List > >Subject: Re: Trim all fields before validation > >Date: Wed, 31 Aug 2005 15:48:30

Re: Trim all fields before validation

2005-08-31 Thread Dilip Ladhani
That's correct Ed, but there is no way to set it back, unless I modify the code, right? From: Ed Griebel <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Trim all fields before validation Date: Wed, 31 Aug 2005 15:48:3

Re: Trim all fields before validation

2005-08-31 Thread Ed Griebel
keyset. > > Javascript can always work and I do use javascript, but always as a last > resort. > > All ideas are welcome. > > >From: Joe Germuska <[EMAIL PROTECTED]> > >To: "Dilip Ladhani" <[EMAIL PROTECTED]>, user@struts.apache.org > >Subje

Re: Trim all fields before validation

2005-08-31 Thread Dilip Ladhani
: Joe Germuska <[EMAIL PROTECTED]> To: "Dilip Ladhani" <[EMAIL PROTECTED]>, user@struts.apache.org Subject: Re: Trim all fields before validation Date: Wed, 31 Aug 2005 13:58:50 -0500 At 2:49 PM -0400 8/31/05, Dilip Ladhani wrote: Hello all, I was searching for the best way

Re: Trim all fields before validation

2005-08-31 Thread Joe Germuska
At 2:49 PM -0400 8/31/05, Dilip Ladhani wrote: Hello all, I was searching for the best way to do this. I want all the fields on my form to be trimmed before they are sent for validation (I call validate from my action class). What's the best way to do this if I have DynaValidatorActionForm?

Re: Trim all fields before validation

2005-08-31 Thread Frank W. Zammetti
Take a peek at the ParameterMunger filter in Java Web Parts: http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/ParameterMungerFilter.html This will do what you want I think. If you decide to use it and have any suggestions, they are always welcome :) Frank Dilip Ladhani wrote

Trim all fields before validation

2005-08-31 Thread Dilip Ladhani
Hello all, I was searching for the best way to do this. I want all the fields on my form to be trimmed before they are sent for validation (I call validate from my action class). What's the best way to do this if I have DynaValidatorActionForm? thanks, Dilip --