Hi Fernando,
i solved this be integrating the check into the onSubmit method:

       /**
        * @see org.apache.wicket.markup.html.form.Form#onSubmit()
        */
       @Override
       public void onSubmit()
       {
           //validate the password fields...
           if (!(getModelObject() instanceof RegistrationFormInputModel)) {
               error("internal error");
               return;
           }
RegistrationFormInputModel model = (RegistrationFormInputModel)getModelObject();

           String pw = model.getInpPassword();
           if (pw!=null) {
               if (pw.length()<MIN_PASSWORD_LENGTH) {
                   error("password to short");
               }
               if (pw.equals(model.getInpPasswordAgain())) {
                   //password validation successful.
               } else {
error("passwords do not match");
               }
           } else {
//you should comment out this one :)
info("password: "+model.getInpPassword()+ " / "+model.getInpPasswordAgain());
               //error("no password provided");
           }
[..]

regards, nico


Fernando Wermus schrieb:
In the Wizard example for singing up, I doesn't appear two PasswordTextField
to verify if both were completed with the same password. I imagine this is
something solved and then I was looking at google. At the same time it is
something easy. How can I solve by my self? Just a guide.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to