struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Winterfeldt <dwinterfe...@yahoo.com>
Subject Re: Opinions on using Locale for Validation
Date Wed, 19 Jun 2002 15:42:38 GMT
If you don't know about this, there is a validation
framework for Struts.  And actually there are a few
(http://jakarta.apache.org/struts/resources.html). 
The Struts Validator can handle defining different
rules for different locales and validation rules are
defined in an xml file.  It is available in the
nightly downloads and there is an example webapp
(web/validator) to see how it handles locales.  If you
are using an older version of Struts, downloads are
available here.

http://home.earthlink.net/~dwinterfeldt

David

--- Scott Carlson <scottcarlson@yahoo.com> wrote:
> I'm looking at doing currency and date validation in
> my app.  I would like to
> take Locale into account with this. Where is the
> best place to do this?
> 
> I could do it in the validate() on my ActionForm,
> but there is no getLocale()
> like there is in the Action base class.  I could
> duplicate it there, of course.
> 
> I could do it in execute() of my Action subclass,
> which has the getLocale(),
> which makes sense, because that's where I'd have to
> pull it out of the
> ActionForm and move into my TransferObject, or pass
> to my BusinessObject.  As a
> subnote, it would be nice if the BeanUtils could
> take a Locale and pass it to
> the Converter object.  
> 
> Hopefully, I made sense.  Comments?
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message