use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class AuthActionTiledView method displayModuleNameMenu.
private boolean displayModuleNameMenu(String childName, int index) {
boolean display = false;
AuthConfigViewBean parentVB = (AuthConfigViewBean) getParentViewBean();
String value = parentVB.getModuleName(index);
CCDropDownMenu list = (CCDropDownMenu) getChild(childName);
OptionList optList = parentVB.getModuleNameChoiceValues();
if ((optList != null) && (optList.size() > 0)) {
if ((value != null) && (value.length() != 0)) {
if (!containsOption(optList, value)) {
optList.add(0, value, value);
}
list.setOptions(optList);
list.setValue(value);
display = true;
}
}
return display;
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class AuthActionTiledView method displayCriteriaMenu.
private boolean displayCriteriaMenu(String childName, int index) {
boolean display = false;
AuthConfigViewBean parentVB = (AuthConfigViewBean) getParentViewBean();
CCDropDownMenu list = (CCDropDownMenu) getChild(childName);
OptionList optList = parentVB.getCriteriaNameChoiceValues();
list.setOptions(optList);
if ((optList != null) && (optList.size() > 0)) {
String value = parentVB.getModuleFlag(index);
if ((value != null) && (value.length() != 0)) {
list.setValue(value);
display = true;
}
}
return display;
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class IdentityMembershipConditionAddViewBean method beginDisplay.
/**
* Sets the values to UI model.
*
* @param event Display Event.
* @throws ModelControlException if the default UI model is not accessible.
*/
public void beginDisplay(DisplayEvent event) throws ModelControlException {
IdentitySubjectModel subjectModel = getSubjectModel();
PolicyModel model = (PolicyModel) getModel();
super.beginDisplay(event);
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 = helper.createOptionList(model.getUserSSOToken(), model.getUserLocale(), this, getPossibleValues(subjectModel, realmName));
child.resetStateData();
addRemoveModel.setAvailableOptionList(possible);
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class IdentityMembershipConditionAddViewBean 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 IdentityMembershipConditionEditViewBean method beginDisplay.
/**
* Sets the values to UI model.
*
* @param event Display Event.
*/
public void beginDisplay(DisplayEvent event) throws ModelControlException {
IdentitySubjectModel subjectModel = getSubjectModel();
PolicyModel model = (PolicyModel) getModel();
super.beginDisplay(event);
if (!canModify) {
Map mapValues = getDefaultValues();
if ((mapValues != null) && !mapValues.isEmpty()) {
Set values = (Set) mapValues.get(AMIdentityMembershipCondition.AM_IDENTITY_NAME);
Set identityNames = helper.getAMIdentityNames(model.getUserSSOToken(), values);
propertySheetModel.setValue(VALUES_MULTIPLE_CHOICE_VALUE, AMAdminUtils.getString(identityNames, ",", false));
}
} else {
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("");
CCAddRemove child = (CCAddRemove) getChild(VALUES_MULTIPLE_CHOICE_VALUE);
child.restoreStateData();
if (!submitCycle) {
helper.setSelectedIdentities(child, model.getUserSSOToken(), model.getUserLocale(), this, getDefaultValues());
} else {
// initialize the available/selected component
OptionList possible = helper.createOptionList(model.getUserSSOToken(), model.getUserLocale(), this, getPossibleValues(subjectModel, realmName));
OptionList selected = addRemoveModel.getSelectedOptionList();
List selectedIds = AMAdminUtils.toList(selected);
child.resetStateData();
addRemoveModel.setAvailableOptionList(possible);
addRemoveModel.setSelectedOptionList(helper.createOptionList(model.getUserSSOToken(), model.getUserLocale(), this, selectedIds));
}
}
}
Aggregations