use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class CreateCOTViewBean method populateRealmData.
private void populateRealmData() {
FSAuthDomainsModel model = (FSAuthDomainsModel) getModel();
try {
Set realmNames = new TreeSet(model.getRealmNames("/", "*"));
CCDropDownMenu menu = (CCDropDownMenu) getChild(SINGLECHOICE_REALM_MENU);
OptionList list = new OptionList();
for (Iterator i = realmNames.iterator(); i.hasNext(); ) {
String name = (String) i.next();
list.add(getPath(name), name);
}
menu.setOptions(list);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class CreateSAML2MetaDataViewBean method populateRealmData.
private void populateRealmData() {
CreateMetaDataModel model = (CreateMetaDataModel) getModel();
try {
Set realmNames = new TreeSet(model.getRealmNames("/", "*"));
CCDropDownMenu menu = (CCDropDownMenu) getChild("singleChoiceRealm");
OptionList list = new OptionList();
for (Iterator i = realmNames.iterator(); i.hasNext(); ) {
String name = (String) i.next();
list.add(getPath(name), name);
}
menu.setOptions(list);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class IdentityMembershipConditionEditViewBean method handleBtnFilterRequest.
/**
* Handles filter results request.
*
* @param event Request invocation event.
*/
public void handleBtnFilterRequest(RequestInvocationEvent event) {
CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
setPageSessionAttribute(ENTITY_TYPE, (String) menu.getValue());
bFilter = true;
submitCycle = true;
forwardTo();
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class IdentitySubjectAddViewBean method handleBtnFilterRequest.
/**
* Handles filter results request.
*
* @param event Request invocation event.
*/
public void handleBtnFilterRequest(RequestInvocationEvent event) {
CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
setPageSessionAttribute(ENTITY_TYPE, (String) menu.getValue());
super.handleBtnFilterRequest(event);
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class IdentitySubjectAddViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
IdentitySubjectModel model = (IdentitySubjectModel) getModel();
Set values = null;
if (bFilter) {
Set defaultValue = getValues();
if (defaultValue != null) {
values = getAMIdentity(model, defaultValue);
}
}
super.beginDisplay(event);
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
// initialize the 'Filter' drop down menu
// supportedEntityTypes is a map of entity name to its
// localized value
CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
Map supportedEntityTypes = model.getSupportedEntityTypes(realmName);
OptionList entityTypes = createOptionList(supportedEntityTypes);
entityTypes.add(0, "policy.subject.select.identity.type", "");
menu.setOptions(entityTypes);
menu.setValue("");
// initialize the available/selected component
CCAddRemove child = (CCAddRemove) getChild(VALUES_MULTIPLE_CHOICE_VALUE);
child.restoreStateData();
OptionList selected = addRemoveModel.getSelectedOptionList();
OptionList possible = createOptionList(getPossibleValues(model, realmName));
child.resetStateData();
addRemoveModel.setAvailableOptionList(possible);
List selectedIds = AMAdminUtils.toList(selected);
addRemoveModel.setSelectedOptionList(createOptionList(getAMIdentity(model, selectedIds)));
}
Aggregations