Problem solved.
I just forget to pack the DateToStringConverter into a StringConverter :-)

Cu,
Dave

David Liebeherr wrote:

Hi all,

i want to change the default behaviour of java.lang.Date to HTML-Input field conversion from 2 Digit Year Numbers to 4 Digit Numbers.
I have tried it like this:

---
   public IConverterFactory getConverterFactory() {
       return new IConverterFactory() {

           public IConverter newConverter(Locale locale) {
DateToStringConverter dateConverter = new DateToStringConverter(); dateConverter.setDateFormat(locale, DateFormat.getDateInstance(DateFormat.MEDIUM));

               Converter converter = new Converter(locale);
               converter.set(Date.class, dateConverter);
               return converter;
           }
       };
   }
---
In my App-Servlet.
But the Problem is still there that when i try to edit (TextField) or show (Label) (both with compoundProperty) the Year is still rendered with only 2 Digits.
What do i do wrong?

Thanks,
Dave



--
Rent-a-Developer
David Liebeherr
Tel.: 0721 3504990
mail: [EMAIL PROTECTED]

SUN Certified Java Associate (SCJA)



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to