use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method populateMechID.
void populateMechID() {
populateMechID = true;
CCAddRemoveModel model = new CCAddRemoveModel();
model.setOrientation(CCAddRemoveModel.VERTICAL);
model.setListboxHeight(CCAddRemoveModel.DEFAULT_LISTBOX_HEIGHT);
setMechID(model);
propertySheetModel.setModel(ATTR_NAME_SECURITY_MECH_ID, model);
}
use of com.sun.web.ui.model.CCAddRemoveModel 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.model.CCAddRemoveModel 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();
}
use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.
the class IDFFAffiliateViewBean method createPropertyModel.
protected void createPropertyModel() {
psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertyIDFFAffiliate.xml"));
psModel.clear();
if (affiliateMembersModel == null) {
affiliateMembersModel = new CCAddRemoveModel();
}
psModel.setModel("arlistAffiliateMembers", affiliateMembersModel);
}
use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.
the class SAMLv2AffiliateViewBean method createPropertyModel.
protected void createPropertyModel() {
SAMLv2Model model = (SAMLv2Model) getModel();
retrieveCommonProperties();
psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertySAMLv2Affiliation.xml"));
psModel.clear();
if (samladdRemoveModel == null) {
samladdRemoveModel = new CCAddRemoveModel();
}
psModel.setModel(model.AFFILIATE_MEMBER, samladdRemoveModel);
}
Aggregations