use of com.sun.web.ui.view.addremove.CCAddRemove in project OpenAM by OpenRock.
the class IdentitySubjectAddViewBean method getValues.
protected Set getValues(String subjectType) throws ModelControlException {
CCAddRemove child = (CCAddRemove) getChild(VALUES_MULTIPLE_CHOICE_VALUE);
child.restoreStateData();
Set values = getValues(addRemoveModel.getSelectedOptionList());
if ((values == null) || values.isEmpty()) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "policy.missing.subject.value");
values = null;
}
return values;
}
use of com.sun.web.ui.view.addremove.CCAddRemove in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method repopulateMechID.
protected void repopulateMechID() {
CCAddRemove child = (CCAddRemove) getChild(ATTR_NAME_SECURITY_MECH_ID);
child.resetStateData();
populateMechID();
}
use of com.sun.web.ui.view.addremove.CCAddRemove in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionEditViewBean method handleButton2Request.
/**
* Handles reset request.
*
* @param event Request Invocation Event.
*/
public void handleButton2Request(RequestInvocationEvent event) {
CCAddRemove view = (CCAddRemove) getChild(ATTR_NAME_SECURITY_MECH_ID);
view.resetStateData();
populateMechID();
populateValues = true;
forwardTo();
}
use of com.sun.web.ui.view.addremove.CCAddRemove in project OpenAM by OpenRock.
the class IDFFAffiliateViewBean method handleButton1Request.
/**
* Handles save
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
retrieveCommonProperties();
IDFFModel model = (IDFFModel) getModel();
try {
// get affiliate members
CCAddRemove addRemoveList = (CCAddRemove) getChild(model.ATTR_AFFILIATE_MEMBERS);
addRemoveList.restoreStateData();
CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
Set members = new HashSet(getSelectedValues(addRemoveModel));
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
Map orig = model.getAffiliateProfileAttributeValues(realm, entityName);
Map values = ps.getAttributeValues(orig, false, model);
model.updateAffiliateProfile(realm, entityName, values, members);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.Affiliate.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
debug.warning("IDFFAffiliateViewBean.handleButton1Request", e);
}
forwardTo();
}
use of com.sun.web.ui.view.addremove.CCAddRemove in project OpenAM by OpenRock.
the class SAMLv2AffiliateViewBean method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
SAMLv2Model model = (SAMLv2Model) getModel();
CCAddRemove addRemoveList = (CCAddRemove) getChild(model.AFFILIATE_MEMBER);
addRemoveList.restoreStateData();
CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
Set members = new HashSet(getSelectedValues(addRemoveModel));
if (members.isEmpty() || members == null) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
}
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
Map orig = getStandardAffiliationValues();
Map values = ps.getAttributeValues(orig, false, model);
model.setStdAffilationValues(realm, entityName, values, members);
//save for ext will be done once backend api is ready
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.affiliation.property.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations