add(passwordField = new PasswordTextField("password", new Model<String>()));
ConfigurationDao cfgDao = getBean(ConfigurationDao.class);
passwordField.setRequired(false).add(minimumLength(getMinPasswdLength(cfgDao)));
SalutationDao salutDao = getBean(SalutationDao.class);
FieldLanguageDao langDao = getBean(FieldLanguageDao.class);
salutation = salutDao.get(getModelObject().getSalutations_id(), getLanguage());
lang = langDao.getFieldLanguageById(getModelObject().getLanguage_id());
add(new DropDownChoice<Salutation>("salutation"
, new PropertyModel<Salutation>(this, "salutation")
, salutDao.getUserSalutations(getLanguage())
, new ChoiceRenderer<Salutation>("label.value", "salutations_id"))
.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = -6748844721645465468L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
GeneralUserForm.this.getModelObject().setSalutations_id(salutation.getSalutations_id());
}
}));
add(new TextField<String>("firstname"));
add(new TextField<String>("lastname"));
add(new DropDownChoice<String>("timeZoneId", AVAILABLE_TIMEZONES));
add(new DropDownChoice<FieldLanguage>("language"
, new PropertyModel<FieldLanguage>(this, "lang")
, langDao.getLanguages()
, new ChoiceRenderer<FieldLanguage>("name", "language_id"))
.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 2072021284702632856L;
@Override