From: Anthony E. <me...@an...> - 2002-03-27 19:55:04
|
> -----Original Message----- > From: Nick Bauman [mailto:ni...@co...] > Sent: Wednesday, March 27, 2002 2:06 PM > To: me...@an... > Subject: Re: [FormProc-developer] Changes for Localization support > > > Anthony, > > I did the Locale thing in Integradata a while back. What made you think of > it / want to do it now? A desire to solidify the API prior to going to version 1.0. BTW - Does this mean that the Rule interface should be changed to the folowing: public RuleResult validate(Object value, Locale locale); > > > Greetings all, > > > > I have just checked in some changes to the CVS server which modify the > > Validator and Storer interfaces so that validate() and store() methods > > now include a Locale object. If you have written any Validator or > > Storer implementations in Java then they will need to be modified to > > support this change. I have already modified all of the built in > > validators to handle this change. > > > > I am trying to get all of these API-breaking changes in prior to going > > to 1.0. The next release will be a 1.0 beta release, so get your > > changes in now if you think that it will break the API. > > > > In addition to the change above, the ValidationResult class now > > includes a getLocale() method which returns the Locale which was used > > during the validation. Right now the > > ValidationResult.getErrorMessage() method uses the value of > > Locale.getDefault() if you do not specify the Locale as an argument to > > the getErrorMessage() method. Do you think this should be changed so > > it uses the locale used during validation and then falls back to the > > Locale.getDefault() as a last resort? The getErrorMessage(Locale > > > Yes, always. I have no idea why you'd want it any other way. It was the other way before because the VaidatorResult did not know the Locale which was used during validation because that information was not being passed to the validator. Sincerely, Anthony Eden |