Besides the bug of having those two components not Serializable (which throws an Exception while trying to bind them to HttpSession automatically by Wicket), how about make EqualPasswordInputValidator a subclass of EqualInputValidator? There's only one difference: the key of the message to be displayed.

Anyway... why there's a EqualPasswordInputValidator?! This way, there should be EqualLoginInputValidator, EqualBirthdayInputValidator, etc... :)

if the developer wants to put more than one EqualInputValidator in the same form, he/she could specify the Key of the message in the constructor.

FormInput.properties -->
  inputForm.SomeUserKey.EqualInputValidator=bla bla bla...

FormInput.java -->
  add(new EqualInputValidator(formComponentLeft, formComponentRight, "SomeUserKey"));

Regardsm

--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to