/** * Adds sub configuration. * * @param event Request Invocation Event. */ public void handleTblSubConfigButtonAddRequest(RequestInvocationEvent event) { SubSchemaModel model = (SubSchemaModel) getModel(); Map createable = model.getCreateableSubSchemaNames(); if (!createable.isEmpty()) { if (createable.size() > 1) { SubSchemaTypeSelectViewBean vb = (SubSchemaTypeSelectViewBean) getViewBean(SubSchemaTypeSelectViewBean.class); addViewBeanClassToPageSession(); unlockPageTrail(); passPgSessionMap(vb); vb.forwardTo(getRequestContext()); } else { String subSchema = (String) createable.keySet().iterator().next(); setPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME, subSchema); SubConfigAddViewBean vb = (SubConfigAddViewBean) getViewBean(SubConfigAddViewBean.class); addViewBeanClassToPageSession(); unlockPageTrail(); passPgSessionMap(vb); vb.forwardTo(getRequestContext()); } } else { forwardTo(); } }
public void beginDisplay(DisplayEvent event) throws ModelControlException { super.beginDisplay(event); SubSchemaModel model = (SubSchemaModel) getModel(); if (model.hasGlobalSubSchema()) { if (!submitCycle) { populateTableModel(model.getSubConfigurations()); } resetButtonState(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_DELETE); Map createable = model.getCreateableSubSchemaNames(); if (createable.isEmpty()) { resetButtonState(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_ADD); } else { SubConfigModel scModel = getSubConfigModel(); boolean canCreate = false; for (Iterator i = createable.keySet().iterator(); i.hasNext() && !canCreate; ) { String name = (String) i.next(); String plugin = scModel.getSelectableSubConfigNamesPlugin(name); if (plugin == null) { canCreate = true; } else { Set subconfigNames = scModel.getSelectableConfigNames(name); canCreate = (subconfigNames != null) && !subconfigNames.isEmpty(); } } disableButton(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_ADD, !canCreate); } } if (serviceName.equals("iPlanetAMAuthHTTPBasicService")) { CCRadioButton radio = (CCRadioButton) getChild("iplanet-am-auth-http-basic-module-configured"); if ((radio.getValue() == null) || (radio.getValue().equals(""))) { String defaultModule = new String(); String realmName = SMSEntry.getRootSuffix(); if (realmName != null) { List moduleList = AMAuthUtils.getModuleInstancesForHttpBasic(realmName); if (!moduleList.isEmpty()) { defaultModule = (String) moduleList.get(0); radio.setValue(defaultModule); } } } } }