setPassword(StringUtils.defaultIfEmpty(getPassword(), StringUtils.EMPTY));
if (getPassword() == null) { setPassword(StringUtils.EMPTY); setConfirmPassword(StringUtils.EMPTY); }
    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {        if (!cycle.isRewinding()) {            // Make the password non-null            setPassword(StringUtils.defaultIfEmpty(getPassword(), StringUtils.EMPTY));                        // If the confirmPassword is null, then init it to be the same as the password            setConfirmPassword((String) ObjectUtils.defaultIfNull(getConfirmPassword(), getPassword()));               }                super.renderComponent(writer, cycle);                // At rewind time, after the user has filled in the form, do any validation that spans        // multiple fields.  Such validation cannot simply use a validator bound to a single field.        if (cycle.isRewinding()) {            // The user typed in the password twice.  Make sure that it was the same both times.            IValidationDelegate delegate =                TapestryUtils.getValidator((AbstractComponent) cycle.getPage());            String password = StringUtils.defaultIfEmpty(getPassword(), StringUtils.EMPTY);            String confirmPassword = StringUtils.defaultIfEmpty(getConfirmPassword(), StringUtils.EMPTY);            if (!password.equals(confirmPassword)) {                delegate.record(getPasswordMismatchMessage(), ValidationConstraint.CONSISTENCY);                return;            }        }    }