use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class MAPDeviceProfileViewBean method handleButton1Request.
/**
* Handles create device request.
*
* @param event Request Invocation Event.
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
submitCycle = true;
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
MAPDeviceProfileModel model = (MAPDeviceProfileModel) getModel();
deviceName = (String) getDisplayFieldValue(TF_DEVICE_NAME);
Map orig = model.getAttributeValues(deviceName, (String) getDisplayFieldValue(TF_CLASSIFICATION));
try {
Map values = ps.getAttributeValues(orig, true, model);
model.modifyProfile(deviceName, values);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class SCPolicyViewBean method getAllValues.
protected Map getAllValues() throws ModelControlException, AMConsoleException {
Map values = null;
AMServiceProfileModel model = (AMServiceProfileModel) getModel();
if (model != null) {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
values = ps.getAttributeValues(model.getAttributeValues(), false, false, model);
}
return values;
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class WSAuthNServicesViewBean method prePopulateTable.
private void prePopulateTable() {
Map attributeValues = (Map) removePageSessionAttribute(PROPERTY_ATTRIBUTE);
if (attributeValues != null) {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
ps.setAttributeValues(attributeValues, getModel());
}
prePopulateHandlersTable(attributeValues);
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class SelectTypeViewBeanBase method createChild.
protected View createChild(String name) {
View view = null;
if (name.equals(PGTITLE_TWO_BTNS)) {
view = new CCPageTitle(this, ptModel, name);
} else if (name.equals(PROPERTY_ATTRIBUTE)) {
view = new AMPropertySheet(this, propertySheetModel, name);
} else if (propertySheetModel.isChildSupported(name)) {
view = propertySheetModel.createChild(this, name, getModel());
if (name.equals(getTypeOptionsChildName())) {
CCRadioButton rb = (CCRadioButton) view;
rb.setOptions(getTypeOptions());
}
} else if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else {
view = super.createChild(name);
}
return view;
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class RealmPropertiesViewBean method handleButton1Request.
/**
* Handles save button request.
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
submitCycle = true;
RMRealmModel model = (RMRealmModel) getModel();
String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
AMPropertySheet ps = (AMPropertySheet) getChild(REALM_PROPERTIES);
try {
Map orig = model.getAttributeValues(realm);
Map values = ps.getAttributeValues(orig, true, true, model);
model.setAttributeValues(realm, values);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations