use of com.sun.identity.console.service.model.SCModel in project OpenAM by OpenRock.
the class SCPropertiesBase method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
SCModel model = (SCModel) getModel();
if (model != null) {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
propertySheetModel.clear();
setAttributeValuesToPropertyModel(ps, model);
}
}
use of com.sun.identity.console.service.model.SCModel in project OpenAM by OpenRock.
the class SCPropertiesBase method getValues.
protected Map getValues() throws ModelControlException, AMConsoleException {
SCModel model = (SCModel) getModel();
Map values = null;
Map orig = model.getValues();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
// pass true to get only the values that have been modified
return ps.getAttributeValues(orig, true, model);
}
use of com.sun.identity.console.service.model.SCModel in project OpenAM by OpenRock.
the class SCPropertiesBase method handleButton1Request.
/**
* Handles save button request.
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
SCModel model = (SCModel) getModel();
Map modifiedValues = getValues();
onBeforeSaveProfile(modifiedValues);
model.setValues(modifiedValues);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
forwardTo();
} catch (AMConsoleException a) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", a.getMessage());
forwardTo();
}
}
Aggregations