The date picker component already tries to sync with the text field you provide as the target. Did you try this?
Eelco On 2/1/07, Scott Swank <[EMAIL PROTECTED]> wrote: > I just (a bit too optimistically) tried to get the converter from my > TextField and use it to set the DateConverter for the corresponding > DatePicker. I definitely want to retain the i18n (mm/dd/yyyy for ENGLISH > and dd/mm/yyyy for FRENCH). Is there a straightforward way to synch up the > DateConverters for a TextField and DatePicker while retaining > internationalization? > > RequiredTextField checkIn = new RequiredTextField("checkIn", new > PropertyModel(roomRequest, > "checkIn"), Date.class); > checkIn.setOutputMarkupId(true); > checkIn.add(DateValidator.minimum(getToday())); > add(checkIn); > > DatePicker dp = new > CylleniusCalendar("checkInPicker", checkIn); > dp.setOutputMarkupId(true); > dp.setDateConverter ((DateConverter) checkIn.getConverter()); > add(dp); > > java.lang.ClassCastException: wicket.util.convert.Converter > at > com.vegas.cart.wicket.components.RoomRequestForm.<init>(RoomRequestForm.java > :69) > > Thank you, > Scott > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user