Search in sources :

Example 11 with CCDropDownMenu

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

the class CreateCOTViewBean method populateRealmData.

private void populateRealmData() {
    FSAuthDomainsModel model = (FSAuthDomainsModel) getModel();
    try {
        Set realmNames = new TreeSet(model.getRealmNames("/", "*"));
        CCDropDownMenu menu = (CCDropDownMenu) getChild(SINGLECHOICE_REALM_MENU);
        OptionList list = new OptionList();
        for (Iterator i = realmNames.iterator(); i.hasNext(); ) {
            String name = (String) i.next();
            list.add(getPath(name), name);
        }
        menu.setOptions(list);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) Set(java.util.Set) TreeSet(java.util.TreeSet) Iterator(java.util.Iterator) FSAuthDomainsModel(com.sun.identity.console.federation.model.FSAuthDomainsModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu) OptionList(com.iplanet.jato.view.html.OptionList)

Example 12 with CCDropDownMenu

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

the class CreateSAML2MetaDataViewBean method populateRealmData.

private void populateRealmData() {
    CreateMetaDataModel model = (CreateMetaDataModel) getModel();
    try {
        Set realmNames = new TreeSet(model.getRealmNames("/", "*"));
        CCDropDownMenu menu = (CCDropDownMenu) getChild("singleChoiceRealm");
        OptionList list = new OptionList();
        for (Iterator i = realmNames.iterator(); i.hasNext(); ) {
            String name = (String) i.next();
            list.add(getPath(name), name);
        }
        menu.setOptions(list);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : TreeSet(java.util.TreeSet) Set(java.util.Set) TreeSet(java.util.TreeSet) Iterator(java.util.Iterator) CreateMetaDataModel(com.sun.identity.console.federation.model.CreateMetaDataModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu) OptionList(com.iplanet.jato.view.html.OptionList)

Example 13 with CCDropDownMenu

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

the class IdentityMembershipConditionEditViewBean method handleBtnFilterRequest.

/**
     * Handles filter results request.
     *
     * @param event Request invocation event.
     */
public void handleBtnFilterRequest(RequestInvocationEvent event) {
    CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
    setPageSessionAttribute(ENTITY_TYPE, (String) menu.getValue());
    bFilter = true;
    submitCycle = true;
    forwardTo();
}
Also used : CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu)

Example 14 with CCDropDownMenu

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

the class IdentitySubjectAddViewBean method handleBtnFilterRequest.

/**
     * Handles filter results request.
     *
     * @param event Request invocation event.
     */
public void handleBtnFilterRequest(RequestInvocationEvent event) {
    CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
    setPageSessionAttribute(ENTITY_TYPE, (String) menu.getValue());
    super.handleBtnFilterRequest(event);
}
Also used : CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu)

Example 15 with CCDropDownMenu

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

the class IdentitySubjectAddViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    IdentitySubjectModel model = (IdentitySubjectModel) getModel();
    Set values = null;
    if (bFilter) {
        Set defaultValue = getValues();
        if (defaultValue != null) {
            values = getAMIdentity(model, defaultValue);
        }
    }
    super.beginDisplay(event);
    String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    // initialize the 'Filter' drop down menu
    // supportedEntityTypes is a map of entity name to its
    // localized value
    CCDropDownMenu menu = (CCDropDownMenu) getChild(FILTER_TYPE);
    Map supportedEntityTypes = model.getSupportedEntityTypes(realmName);
    OptionList entityTypes = createOptionList(supportedEntityTypes);
    entityTypes.add(0, "policy.subject.select.identity.type", "");
    menu.setOptions(entityTypes);
    menu.setValue("");
    // initialize the available/selected component
    CCAddRemove child = (CCAddRemove) getChild(VALUES_MULTIPLE_CHOICE_VALUE);
    child.restoreStateData();
    OptionList selected = addRemoveModel.getSelectedOptionList();
    OptionList possible = createOptionList(getPossibleValues(model, realmName));
    child.resetStateData();
    addRemoveModel.setAvailableOptionList(possible);
    List selectedIds = AMAdminUtils.toList(selected);
    addRemoveModel.setSelectedOptionList(createOptionList(getAMIdentity(model, selectedIds)));
}
Also used : IdentitySubjectModel(com.sun.identity.console.policy.model.IdentitySubjectModel) HashSet(java.util.HashSet) Set(java.util.Set) OptionList(com.iplanet.jato.view.html.OptionList) List(java.util.List) CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu) HashMap(java.util.HashMap) Map(java.util.Map) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) OptionList(com.iplanet.jato.view.html.OptionList)

Aggregations

CCDropDownMenu (com.sun.web.ui.view.html.CCDropDownMenu)37 OptionList (com.iplanet.jato.view.html.OptionList)25 Set (java.util.Set)23 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)16 Map (java.util.Map)10 TaskModel (com.sun.identity.console.task.model.TaskModel)9 Iterator (java.util.Iterator)8 TreeSet (java.util.TreeSet)7 HashSet (java.util.HashSet)6 HttpServletRequest (javax.servlet.http.HttpServletRequest)6 IdentitySubjectModel (com.sun.identity.console.policy.model.IdentitySubjectModel)4 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)4 List (java.util.List)4 PolicyModel (com.sun.identity.console.policy.model.PolicyModel)2 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)2 HashMap (java.util.HashMap)2 View (com.iplanet.jato.view.View)1 Option (com.iplanet.jato.view.html.Option)1 AuthPropertiesModel (com.sun.identity.console.authentication.model.AuthPropertiesModel)1 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)1