use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class CoreAttributesViewBean method getValues.
protected Map getValues() throws ModelControlException, AMConsoleException {
Map values = null;
CoreAttributesModel model = (CoreAttributesModel) getModelInternal();
if (model != null) {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
values = ps.getAttributeValues(model.getAttributeValues(), model);
}
return values;
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class CoreAttributesViewBean method handleButton1Request.
/**
* Handles cancel request.
*
* @param event Request invocation event.
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
CoreAttributesModel model = (CoreAttributesModel) getModel();
Map original = model.getAttributeValues();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
model.setAttributeValues(ps.getAttributeValues(original, true, model));
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
forwardTo();
} catch (AMConsoleException a) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", a.getMessage());
forwardTo();
}
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class EditAuthTypeViewBean method beginDisplay.
/**
* This will populate the property sheet with attribute values for display. If this is called after
* a dynamic request the values that was present on the UI (which might not have been persisted) will be used.
* @param event The display event.
* @throws ModelControlException
*/
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
final AuthPropertiesModel model = getAuthModel();
final String instance = (String) getPageSessionAttribute(SERVICE_TYPE);
final AMPropertySheet propertySheet = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
Map valueMap = unsavedAttributeValues;
if (model != null && propertySheet != null) {
// If this is not a dynamic request the UI is set with persisted values
if (!dynamicRequest) {
valueMap = model.getInstanceValues(instance);
}
if (valueMap != null) {
propertySheet.setAttributeValues(valueMap, model);
}
}
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class AuthConfigViewBean method cacheValues.
private void cacheValues() throws ModelControlException {
AuthConfigurationModel acModel = (AuthConfigurationModel) getModel();
try {
Map original = acModel.getValues();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
Map changedValues = (Map) ps.getAttributeValues(original, true, acModel);
original.putAll(changedValues);
setPageSessionAttribute(ReorderAuthChainsViewBean.PG_SESSION_TRACKING, (HashMap) changedValues);
} 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 NewAuthInstanceViewBean 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(INSTANCE_TYPE)) {
//set the available options for the radio button
CCRadioButton radio = (CCRadioButton) view;
radio.setOptions(createAuthTypeOptionList());
}
} else if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else {
view = super.createChild(name);
}
return view;
}
Aggregations