// -------------------------------
// Password policy specification
// -------------------------------
final AjaxDropDownChoicePanel<Long> passwordPolicy = new AjaxDropDownChoicePanel<Long>("passwordPolicy",
new ResourceModel("passwordPolicy", "passwordPolicy").getObject(), new PropertyModel<Long>(resourceTO,
"passwordPolicy"));
passwordPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.PASSWORD));
passwordPolicy.setChoices(new ArrayList<Long>(passwordPolicies.getObject().keySet()));
((DropDownChoice<?>) passwordPolicy.getField()).setNullValid(true);
securityContainer.add(passwordPolicy);
// -------------------------------
// -------------------------------
// Account policy specification
// -------------------------------
final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>("accountPolicy",
new ResourceModel("accountPolicy", "accountPolicy").getObject(), new PropertyModel<Long>(resourceTO,
"accountPolicy"));
accountPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.ACCOUNT));
accountPolicy.setChoices(new ArrayList<Long>(accountPolicies.getObject().keySet()));
((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);
securityContainer.add(accountPolicy);
// -------------------------------
// -------------------------------
// Sync policy specification
// -------------------------------
final AjaxDropDownChoicePanel<Long> syncPolicy = new AjaxDropDownChoicePanel<Long>("syncPolicy",
new ResourceModel("syncPolicy", "syncPolicy").getObject(), new PropertyModel<Long>(resourceTO,
"syncPolicy"));
syncPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.SYNC));
syncPolicy.setChoices(new ArrayList<Long>(syncPolicies.getObject().keySet()));