void setPassword1(String password1) {
        this.password1 = password1;
    }

    @NotNull(groups=PasswordValidationGroup.class)
    @Size(max=16, min=8, message="Password must be between 8 and 16 characters long",
            groups = PasswordValidationGroup.class)
    @Override
    public String getPassword2() {
        return password2;
    }

    public void setPassword2(String password2) {
        this.password2 = password2;
    }
    
}
</code></pre>

            <p>Finally, the Facelets view.</p>
