Why not use EqualPasswordInputValidator ?
Martijn
On 10/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 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]
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]