use of com.sun.web.ui.view.html.CCSelect in project OpenAM by OpenRock.
the class AuthToRealmAddViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
String filter = (String) getDisplayFieldValue(AuthToRealmHelper.ATTR_FILTER);
if ((filter == null) || (filter.trim().length() == 0)) {
setDisplayFieldValue(AuthToRealmHelper.ATTR_FILTER, "*");
}
try {
Set realmNames = helper.getRealmNames(filter, (PolicyModel) getModel());
if (realmNames.isEmpty()) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "policy.condition.authtorealm.no.search.result.message");
}
CCSelect sl = (CCSelect) getChild(AuthToRealmHelper.ATTR_VALUE);
sl.setOptions(createOptionList(getLabelValueMap(realmNames)));
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
Aggregations