if (user == null)
fields.setVisible(false);
fields.add (new WebMarkupContainer("oldPassContainer")
.add((new FeedbackBorder("oldPassBorder"))
.add(new PasswordTextField("oldPass", new Model<String>())
.setLabel(new Model<String>("Old Password"))
.add (new CorrectPasswordValidator())))
.setVisible(!haveKey));
fields.add((new FeedbackBorder("passwordBorder"))
.add(password = (PasswordTextField) new PasswordTextField("password", new Model<String>())
.setLabel(new Model<String>("New Password"))
.add(StringValidator.lengthBetween(4, 32))
.add(new PatternValidator("[\\w!@#$%^&*()-=_+\\\\.,;:/]+"))
.setRequired(true)));
fields.add((new FeedbackBorder("verifyPasswordBorder"))
.add(verifyPassword = (PasswordTextField) new PasswordTextField("verifyPassword", new Model<String>())
.setLabel(new Model<String>("Verify New Password"))
.setRequired(true)));
add(new EqualPasswordConvertedInputValidator(password, verifyPassword));
}