use of com.iplanet.jato.view.html.Option in project OpenAM by OpenRock.
the class RMRealmAddViewBean method populateRealmParentList.
private void populateRealmParentList() {
RMRealmModel model = (RMRealmModel) getModel();
Set realms = new HashSet();
try {
realms = model.getRealmNames(model.getStartDN(), "*");
} catch (AMConsoleException a) {
// do something here
}
Map display = new HashMap(realms.size() * 2);
for (Iterator i = realms.iterator(); i.hasNext(); ) {
String tmp = (String) i.next();
String path = getPath(tmp);
display.put(tmp, path);
}
OptionList optionList = createOptionList(display);
CCSelectableList parentList = (CCSelectableList) getChild(RMRealmModel.TF_PARENT);
parentList.setOptions(optionList);
String value = (String) parentList.getValue();
if ((value == null) || (value.length() == 0)) {
Option opt = optionList.get(0);
parentList.setValue(opt.getValue());
}
}
Aggregations