private void prePopulateTable() { Map attributeValues = (Map) removePageSessionAttribute(PROPERTY_ATTRIBUTE); if (attributeValues != null) { AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE); ps.setAttributeValues(attributeValues, getModel()); } prePopulateHandlersTable(attributeValues); }
/* Returns a map of all settings, including those not changed from the default values in the model. AMConsoleException will be thrown if passwords are mis-matched. */ private Map getAttributeSettings() 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, model); } return values; }
/** * Handles next button request. * * @param event Request invocation event. */ public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException { submitCycle = true; String subConfigName = (String) getDisplayFieldValue(ATTR_SUBCONFIG_NAME); SubConfigModel model = (SubConfigModel) getModel(); try { AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE); String schemaName = (String) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME); Map values = ps.getAttributeValues(model.getAttributeNames(schemaName)); model.createSubConfig(subConfigName, schemaName, values); backToProfileViewBean(); } catch (AMConsoleException e) { setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage()); forwardTo(); } }
public void beginDisplay(DisplayEvent event) throws ModelControlException { super.beginDisplay(event); SubConfigModel model = (SubConfigModel) getModel(); String schemaName = (String) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME); if (!submitCycle) { AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE); propertySheetModel.clear(); try { ps.setAttributeValues(model.getServiceSchemaDefaultValues(schemaName), model); } catch (AMConsoleException a) { setInlineAlertMessage(CCAlert.TYPE_WARNING, "message.warning", "noproperties.message"); } } Set subconfigNames = model.getSelectableConfigNames(schemaName); if ((subconfigNames != null) && !subconfigNames.isEmpty()) { CCDropDownMenu menu = (CCDropDownMenu) getChild(ATTR_SUBCONFIG_NAME); OptionList optList = this.createOptionList(subconfigNames); menu.setOptions(optList); } }