I'm trying to override: public IConverter getConverter();
but it's final - how is this usually done? This is way too difficult, IMHO... Michael -----Original Message----- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 4:42 PM To: [email protected] Subject: RE: java.util.Date model accepting Date incl. time? Well, actually your previous approach might solve my Validator problem, and this way I could enforce specific conversion rules per field. I didn't know that I could do that - let me dig around and see if I can make this work. Michael -----Original Message----- From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 4:39 PM To: [email protected] Subject: RE: java.util.Date model accepting Date incl. time? Oh, sorry, yes, it's likely the validator, not the converter. Ignore my just sent email. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -----Original Message----- From: Michael Mehrle <[EMAIL PROTECTED]> Sent: Monday, June 02, 2008 6:36 PM To: [email protected] Subject: RE: java.util.Date model accepting Date incl. time? I'm actually now thinking that is merely a DateValidator.range problem. If there is a time I don't mind it being shown - it's the DateValidator.range that won't accept it. The other solution would be to remove the time from the model via the converter below. However, I have not seen a way to do this - it seems that one needs to provide a time format and that's it. How would I ignore the time altogether? Hope this all makes sense... Michael -----Original Message----- From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 3:20 PM To: [email protected] Subject: Re: java.util.Date model accepting Date incl. time? It looks like because the DateConverter code uses DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into this method, it uses time style "FULL", which is documented like this: "3:30:42pm PST". Try using that for your date. If that works, than the problem is just that it expects a much longer version of the time. If that's the case, just override the converter for java.util.Date (I know you know how to do this ;) and you could put a new DateConverter, and override this method to return whatever you want. For instance you could do DateFormat.getDateTimeInstance(foo, bar, foo, bar) /** * @param locale * @return Returns the date format. */ public DateFormat getDateFormat(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } return DateFormat.getDateInstance(DateFormat.SHORT, locale); } --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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]
