use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class CreateHostedSPViewBean method beginDisplay.
public void beginDisplay(DisplayEvent e) {
String value = (String) getDisplayFieldValue(HAS_META_DATA);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(HAS_META_DATA, "no");
}
value = (String) getDisplayFieldValue(SELECT_COT);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(SELECT_COT, "no");
}
value = (String) getDisplayFieldValue(RADIO_EXTENDED);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(RADIO_EXTENDED, "file");
}
value = (String) getDisplayFieldValue(RADIO_META);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(RADIO_META, "file");
}
setDisplayFieldValue(ENTITY_ID, (AMSystemConfig.isConsoleRemote) ? SystemProperties.getServerInstanceName() : getRequestURL());
populateTableModel();
Set userAttrNames = AMAdminUtils.getUserAttributeNames();
userAttrNames.remove("iplanet-am-user-account-life");
CCDropDownMenu menuUserAttribute = (CCDropDownMenu) getChild("menuUserAttributes");
OptionList optList = createOptionList(userAttrNames);
optList.add(0, "name.attribute.mapping.select", "");
menuUserAttribute.setOptions(optList);
CCCheckBox cbAttrDefault = (CCCheckBox) getChild("tfDefaultAttrMapping");
cbAttrDefault.setChecked(true);
try {
TaskModel model = (TaskModel) getModel();
Set realms = model.getRealms();
CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
menuRealm.setOptions(createOptionList(realms));
String realm = getRequestContext().getRequest().getParameter("realm");
if (realm != null && !realm.trim().isEmpty()) {
setDisplayFieldValue(REALM, realm);
}
} catch (AMConsoleException ex) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", ex.getMessage());
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class CreateRemoteIDPViewBean method beginDisplay.
public void beginDisplay(DisplayEvent e) {
HttpServletRequest req = getRequestContext().getRequest();
String cot = req.getParameter("cot");
if ((cot != null) && (cot.trim().length() > 0)) {
setDisplayFieldValue(COT, cot);
setDisplayFieldValue(COT_CHOICE, cot);
}
String realm = req.getParameter("realm");
if ((realm != null) && (realm.trim().length() > 0)) {
setDisplayFieldValue(REALM, realm);
}
String value = (String) getDisplayFieldValue(RADIO_META);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(RADIO_META, "url");
}
value = (String) getDisplayFieldValue(SELECT_COT);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(SELECT_COT, "no");
}
try {
TaskModel model = (TaskModel) getModel();
Set realms = model.getRealms();
CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
menuRealm.setOptions(createOptionList(realms));
} catch (AMConsoleException ex) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", ex.getMessage());
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class CreateRemoteSPViewBean method beginDisplay.
public void beginDisplay(DisplayEvent e) {
HttpServletRequest req = getRequestContext().getRequest();
String cot = req.getParameter("cot");
if ((cot != null) && (cot.trim().length() > 0)) {
setDisplayFieldValue(COT, cot);
setDisplayFieldValue(COT_CHOICE, cot);
}
String realm = req.getParameter("realm");
if ((realm != null) && (realm.trim().length() > 0)) {
setDisplayFieldValue(REALM, realm);
}
String value = (String) getDisplayFieldValue(RADIO_META);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(RADIO_META, "url");
}
value = (String) getDisplayFieldValue(SELECT_COT);
if ((value == null) || value.equals("")) {
setDisplayFieldValue(SELECT_COT, "no");
}
populateTableModel();
Set userAttrNames = AMAdminUtils.getUserAttributeNames();
userAttrNames.remove("iplanet-am-user-account-life");
CCDropDownMenu menuUserAttribute = (CCDropDownMenu) getChild("menuUserAttributes");
OptionList optList = createOptionList(userAttrNames);
optList.add(0, "name.attribute.mapping.select", "");
menuUserAttribute.setOptions(optList);
try {
TaskModel model = (TaskModel) getModel();
Set realms = model.getRealms();
CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
menuRealm.setOptions(createOptionList(realms));
} catch (AMConsoleException ex) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", ex.getMessage());
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class ConfigureGoogleAppsViewBean method beginDisplay.
public void beginDisplay(DisplayEvent e) {
HttpServletRequest req = getRequestContext().getRequest();
try {
TaskModel model = (TaskModel) getModel();
Map map = model.getRealmCotWithHostedIDPs();
Set realms = new TreeSet();
realms.addAll(map.keySet());
CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
menuRealm.setOptions(createOptionList(realms));
String realm = req.getParameter("realm");
if ((realm != null) && (realm.trim().length() > 0)) {
setDisplayFieldValue(REALM, realm);
} else {
if (!realms.isEmpty()) {
realm = (String) realms.iterator().next();
}
}
if ((realm != null) && (realm.trim().length() > 0)) {
Map mapCots = (Map) map.get(realm);
Set cots = new TreeSet();
cots.addAll(mapCots.keySet());
CCDropDownMenu menuCOT = (CCDropDownMenu) getChild("choiceCOT");
menuCOT.setOptions(createOptionList(cots));
String cot = req.getParameter("cot");
if ((cot != null) && (cot.trim().length() > 0)) {
setDisplayFieldValue("choiceCOT", cot);
} else {
if (!cots.isEmpty()) {
cot = (String) cots.iterator().next();
}
}
if ((cot != null) && (cot.trim().length() > 0)) {
Set idps = new TreeSet();
idps.addAll((Set) mapCots.get(cot));
CCDropDownMenu menuIDP = (CCDropDownMenu) getChild("choiceIDP");
menuIDP.setOptions(createOptionList(idps));
String idp = req.getParameter("entityId");
if ((idp != null) && (idp.trim().length() > 0)) {
setDisplayFieldValue("choiceIDP", idp);
}
}
}
} catch (AMConsoleException ex) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", ex.getMessage());
}
String cot = req.getParameter("cot");
if ((cot != null) && (cot.trim().length() > 0)) {
setDisplayFieldValue(COT_CHOICE, cot);
}
}
use of com.sun.web.ui.view.html.CCDropDownMenu in project OpenAM by OpenRock.
the class SubConfigAddViewBean method beginDisplay.
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);
}
}
Aggregations