Search in sources :

Example 11 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class ConditionOpViewBeanBase method createPropertyModel.

private boolean createPropertyModel() {
    boolean init = false;
    HttpServletRequest req = RequestManager.getRequestContext().getRequest();
    String condType = (String) getPageSessionAttribute(PG_SESSION_CONDITION_TYPE);
    if ((condType == null) || (condType.trim().length() == 0)) {
        condType = req.getParameter(getName() + "." + CONDITION_TYPE);
        if ((condType != null) && (condType.trim().length() > 0)) {
            setPageSessionAttribute(PG_SESSION_CONDITION_TYPE, condType);
        }
    }
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    if ((curRealm == null) || (curRealm.trim().length() == 0)) {
        curRealm = req.getParameter(getName() + "." + REALM_NAME);
        if ((curRealm == null) || (curRealm.trim().length() == 0)) {
            setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, curRealm);
        } else {
            realmName = curRealm;
        }
    } else {
        realmName = curRealm;
    }
    init = (curRealm != null) && (curRealm.trim().length() > 0) && (condType != null) && (condType.trim().length() > 0);
    if (init) {
        DelegationConfig dConfig = DelegationConfig.getInstance();
        canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
        propertySheetModel = new AMPropertySheetModel(getConditionXML(curRealm, condType, !canModify));
        propertySheetModel.clear();
        if (canModify) {
            addRemoveModel = new CCAddRemoveModel();
            addRemoveModel.setShowMoveUpDownButtons("false");
            addRemoveModel.clear();
            propertySheetModel.setModel(VALUES_MULTIPLE_CHOICE_VALUE, addRemoveModel);
        }
    }
    return init;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 12 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class EntityMembershipViewBean method handleBtnSearchRequest.

public void handleBtnSearchRequest(RequestInvocationEvent event) {
    submitCycle = false;
    CCAddRemove addRemove = (CCAddRemove) getChild(ADD_REMOVE_MEMBERS);
    addRemove.restoreStateData();
    CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) propertySheetModel.getModel(ADD_REMOVE_MEMBERS);
    cacheAssigned = addRemoveModel.getSelectedOptionList();
    filter = ((String) getDisplayFieldValue(TF_FILTER));
    filter = filter.trim();
    forwardTo();
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove)

Example 13 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class EntityMembersViewBean method handleBtnSearchRequest.

public void handleBtnSearchRequest(RequestInvocationEvent event) {
    submitCycle = false;
    CCAddRemove addRemove = (CCAddRemove) getChild(ADD_REMOVE_MEMBERS);
    addRemove.restoreStateData();
    CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) propertySheetModel.getModel(ADD_REMOVE_MEMBERS);
    cacheAssigned = addRemoveModel.getSelectedOptionList();
    filter = ((String) getDisplayFieldValue(TF_FILTER));
    filter = filter.trim();
    forwardTo();
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove)

Example 14 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class EntityMembersViewBean method createAddRemoveModel.

private CCAddRemoveModel createAddRemoveModel() {
    CCAddRemoveModel addRemoveModel = new CCAddRemoveModel();
    addRemoveModel.setOrientation(CCAddRemoveModel.VERTICAL);
    addRemoveModel.setListboxHeight(CCAddRemoveModel.DEFAULT_LISTBOX_HEIGHT);
    return addRemoveModel;
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel)

Example 15 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class EntityMembershipViewBean method createAddRemoveModel.

private CCAddRemoveModel createAddRemoveModel() {
    CCAddRemoveModel addRemoveModel = new CCAddRemoveModel();
    addRemoveModel.setOrientation(CCAddRemoveModel.HORIZONTAL);
    addRemoveModel.setListboxHeight(CCAddRemoveModel.DEFAULT_LISTBOX_HEIGHT);
    return addRemoveModel;
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel)

Aggregations

CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)33 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)15 Set (java.util.Set)15 HashSet (java.util.HashSet)14 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)11 Map (java.util.Map)11 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)9 HashMap (java.util.HashMap)9 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)8 OptionList (com.iplanet.jato.view.html.OptionList)7 TreeSet (java.util.TreeSet)5 DelegationConfig (com.sun.identity.console.delegation.model.DelegationConfig)4 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)4 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)4 CCOrderedListModel (com.sun.identity.console.ui.model.CCOrderedListModel)4 CCEditableListModel (com.sun.web.ui.model.CCEditableListModel)4 ArrayList (java.util.ArrayList)4 Iterator (java.util.Iterator)4 Option (com.iplanet.jato.view.html.Option)3 SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)3