> I thought this way has some flaw , because it decoupled myDatePicker and > myDatePickerValidator , > Other programmer may form.add(myDatePicker); and forget to > form.add(myDatePickerValidator);
You can hide adding that validator in your component too. Of course, the idea is that you hide everything that has to do with that component in that component. Encapsulation, baby! Unfortunatly, it's a little bit tricky in Wicket 1.2, while in Wicket 2.0 it is easy. The tricky part is that in Wicket 1.2. we can't depend on the hierarchy (using adds) is created entirely yet. For a workaround, you can look at wicket.extensions.wizard.WizardStep#add(IFormValidator validator). It's only in SVN recently, and will be part of 1.2.1. Eelco _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
