password1.setVisible(mode == Mode.CREATE || mode == Mode.CHANGE_PASSWORD);
FormComponent<?> password2 = new PasswordTextField("password2", new Model<String>());
password2.setLabel(new Model<String>("Confirm Password"));
form.add(password1, password2);
password2.setVisible(mode == Mode.CREATE || mode == Mode.CHANGE_PASSWORD);
form.add(new EqualPasswordInputValidator(password1, password2));
form.add(new Button("ok") {
private static final long serialVersionUID = 1L;
@Override