Re: applicationwide datePattern
Hi Korbinian, my mistake, sorry. Regards Dipu On 9/6/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > > Hi Dipu, > > well, the problem is that i have here the Locale("de","DE") which has > default pattern "dd.MM.yy" while I need "dd.MM." - so how can this > be changed? (so MEDIUM instead of SHORT is used) > > Regards > Korbinian > > > Dipu Seminlal schrieb: > > try using session.setLocale() > > thats how i do it. > > > > Regards > > Dipu > > > > On 9/6/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> > >> can anyone tell me how to change the default date pattern wicket should > >> use in the whole app? > >> > >> I mean i can do: > >> > >> add(new DatePicker() { > >> protected String getDatePattern() { > >> return "dd.MM."; > >> } > >> > >> on each component manually, but that doesnt seem to be the right way. > >> > >> Regards, > >> > >> Korbinian > >> > >> > >> - > >> 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] > >
Re: applicationwide datePattern
that worked - thank you Best Regards, Korbinian Francis De Brabandere schrieb: You can override newConverterLocator in your Application @Override protected IConverterLocator newConverterLocator() { ConverterLocator locator = new ConverterLocator(); locator.set(java.sql.Date.class, dateConverter); locator.set(Date.class, dateConverter); locator.set(Timestamp.class, dateConverter); return locator; } with dateConverter being something like this public final class DateTimeConverter extends DateConverter { @Override public DateFormat getDateFormat(Locale locale) { return DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, locale); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: applicationwide datePattern
You can override newConverterLocator in your Application @Override protected IConverterLocator newConverterLocator() { ConverterLocator locator = new ConverterLocator(); locator.set(java.sql.Date.class, dateConverter); locator.set(Date.class, dateConverter); locator.set(Timestamp.class, dateConverter); return locator; } with dateConverter being something like this public final class DateTimeConverter extends DateConverter { @Override public DateFormat getDateFormat(Locale locale) { return DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, locale); } } On 9/6/07, Dipu Seminlal <[EMAIL PROTECTED]> wrote: > try using session.setLocale() > thats how i do it. > > Regards > Dipu > > On 9/6/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > can anyone tell me how to change the default date pattern wicket should > > use in the whole app? > > > > I mean i can do: > > > > add(new DatePicker() { > > protected String getDatePattern() { > > return "dd.MM."; > > } > > > > on each component manually, but that doesnt seem to be the right way. > > > > Regards, > > > > Korbinian > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- http://www.somatik.be Microsoft gives you windows, Linux gives you the whole house. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: applicationwide datePattern
Hi Dipu, well, the problem is that i have here the Locale("de","DE") which has default pattern "dd.MM.yy" while I need "dd.MM." - so how can this be changed? (so MEDIUM instead of SHORT is used) Regards Korbinian Dipu Seminlal schrieb: try using session.setLocale() thats how i do it. Regards Dipu On 9/6/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: Hi, can anyone tell me how to change the default date pattern wicket should use in the whole app? I mean i can do: add(new DatePicker() { protected String getDatePattern() { return "dd.MM."; } on each component manually, but that doesnt seem to be the right way. Regards, Korbinian - 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]
Re: applicationwide datePattern
try using session.setLocale() thats how i do it. Regards Dipu On 9/6/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > > > Hi, > > can anyone tell me how to change the default date pattern wicket should > use in the whole app? > > I mean i can do: > > add(new DatePicker() { > protected String getDatePattern() { > return "dd.MM."; > } > > on each component manually, but that doesnt seem to be the right way. > > Regards, > > Korbinian > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
applicationwide datePattern
Hi, can anyone tell me how to change the default date pattern wicket should use in the whole app? I mean i can do: add(new DatePicker() { protected String getDatePattern() { return "dd.MM."; } on each component manually, but that doesnt seem to be the right way. Regards, Korbinian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]