While we're on this subject... Tapestry's built-in DateTranslator uses a lenient DateFormat, one of my pet peeves. When a user enters a date like 03/44/2005 it's probably an error... I don't want it silently converted to 04/13/2005.
I could override the DateTranslator's behavior in code, add a format.setLenient(false), and tell hivemind to use that as my DateTranslator... not too bad I guess. Is there a better way? Bryan Lewis wrote: >Thanks guys. Now I can get rid of my custom MaxDate validator class! > > >Martin Carel wrote: > > > >>Hi Kirby, >> >> >> >>><set name="message" value="{0} must be on or before {1,date,MM dd >>> >>> >>yyyy}" /> >> >>I just want to mention that I needed to add 'literal' in order for >>this to work (otherwise I have a parsing exception as 'ognl' is the >>default prefix for page spec): >> >><set name="message" value="literal:{0} must be on or before {1,date,MM >>dd yyyy}" /> >> >>Thanks for this, I can now get rid of my custom MinDate validator class! >> >> >> >> >>>To answer your localisation question - just change the above set to: >>><set name="message" value="message:dateBeforeErrorMessage" /> >>>And put into your localisation properties file: >>>dateBeforeErrorMessage={0} must be on or before {1,date,MM/dd/yyyy} >>>And the equivalent in your Swedish localisation properties file. >>> >>> >>I understand what you want me to do, but I see it as a workaround (I >>shouldn't be forced to play with the Swedish locale properties file). >>What I really want to do is to force my locale to English :( >> >>/Martin >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >