use of com.sun.web.ui.view.html.CCRadioButton in project OpenAM by OpenRock.
the class ServicesSelectViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
disableButton("button1", true);
CCRadioButton rb = (CCRadioButton) getChild(ATTR_SERVICE_LIST);
setRadioButtons(rb);
}
use of com.sun.web.ui.view.html.CCRadioButton in project OpenAM by OpenRock.
the class IDRepoSelectTypeViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
disableButton("button1", true);
try {
IDRepoModel model = (IDRepoModel) getModel();
OptionList optList = model.getIDRepoTypes();
if (optList.size() > 0) {
CCRadioButton menu = (CCRadioButton) getChild(ATTR_IDREPO_TYPE);
menu.setOptions(optList);
String type = (String) menu.getValue();
if ((type == null) || (type.trim().length() == 0)) {
menu.setValue(optList.getValue(0));
}
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.web.ui.view.html.CCRadioButton in project OpenAM by OpenRock.
the class SCServiceProfileViewBean method beginDisplay.
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);
}
}
}
}
// If this is a dynamic request the UI is set with unsaved attribute values
AMPropertySheet propertySheet = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
if (dynamicRequest) {
propertySheet.setAttributeValues(unsavedAttributeValues, model);
}
}
use of com.sun.web.ui.view.html.CCRadioButton 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.web.ui.view.html.CCRadioButton in project OpenAM by OpenRock.
the class ServicesSelectViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
disableButton("button1", true);
try {
ServicesModel model = (ServicesModel) getModel();
String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
Map assignables = model.getAssignableServiceNames(curRealm);
CCRadioButton rb = (CCRadioButton) getChild(ATTR_SERVICE_LIST);
OptionList optList = AMFormatUtils.getSortedOptionList(assignables, model.getUserLocale());
rb.setOptions(optList);
String val = (String) rb.getValue();
if ((val == null) || (val.length() == 0)) {
rb.setValue(optList.getValue(0));
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
Aggregations