Search in sources :

Example 16 with CCSelect

use of com.sun.web.ui.view.html.CCSelect in project OpenAM by OpenRock.

the class AuthToRealmAddViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    String filter = (String) getDisplayFieldValue(AuthToRealmHelper.ATTR_FILTER);
    if ((filter == null) || (filter.trim().length() == 0)) {
        setDisplayFieldValue(AuthToRealmHelper.ATTR_FILTER, "*");
    }
    try {
        Set realmNames = helper.getRealmNames(filter, (PolicyModel) getModel());
        if (realmNames.isEmpty()) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "policy.condition.authtorealm.no.search.result.message");
        }
        CCSelect sl = (CCSelect) getChild(AuthToRealmHelper.ATTR_VALUE);
        sl.setOptions(createOptionList(getLabelValueMap(realmNames)));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : Set(java.util.Set) CCSelect(com.sun.web.ui.view.html.CCSelect) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

CCSelect (com.sun.web.ui.view.html.CCSelect)16 Set (java.util.Set)15 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)7 OptionList (com.iplanet.jato.view.html.OptionList)5 HashSet (java.util.HashSet)5 AMModel (com.sun.identity.console.base.model.AMModel)2 Iterator (java.util.Iterator)2 Option (com.iplanet.jato.view.html.Option)1 PolicyModel (com.sun.identity.console.policy.model.PolicyModel)1 SelectRealmModel (com.sun.identity.console.policy.model.SelectRealmModel)1 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)1 CCStaticTextField (com.sun.web.ui.view.html.CCStaticTextField)1 CCTextField (com.sun.web.ui.view.html.CCTextField)1 HashMap (java.util.HashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 Map (java.util.Map)1 TreeSet (java.util.TreeSet)1