Search in sources :

Example 46 with CCActionTableModel

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

the class WSPersonalProfileServiceViewBean method handleTblDSAttributeMapListButtonDeleteRequest.

/**
     * Handles remove LDAP Attribute Mapping request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblDSAttributeMapListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
        tblValues.removeAll(selected);
        setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, tblValues);
        populateDSAttributeMapListTable(tblValues);
    }
    resetButtonState(TBL_DS_ATTRIBUTE_MAP_LIST_DELETE_BTN);
    forwardTo();
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable)

Example 47 with CCActionTableModel

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

the class WSPersonalProfileServiceViewBean method populateSupportedContainersTable.

private void populateSupportedContainersTable(Set containers) {
    tablePopulated = true;
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
    tblModel.clearAll();
    boolean firstEntry = true;
    int counter = 0;
    for (Iterator iter = containers.iterator(); iter.hasNext(); ) {
        if (!firstEntry) {
            tblModel.appendRow();
        } else {
            firstEntry = false;
        }
        String c = (String) iter.next();
        StringTokenizer st = new StringTokenizer(c, "|");
        while (st.hasMoreTokens()) {
            String tok = st.nextToken();
            int idx = tok.indexOf('=');
            if (idx != -1) {
                String id = tok.substring(0, idx);
                String val = tok.substring(idx + 1);
                if (id.equals(WSPersonalProfileServiceModelImpl.SUPPORTED_CONTAINER_CONTAINER_PREFIX)) {
                    tblModel.setValue(TBL_SUPPORTED_CONTAINER_DATA_NAME, val);
                    tblModel.setValue(TBL_SUPPORTED_CONTAINER_HREF_ACTION, Integer.toString(counter));
                }
            }
        }
        counter++;
    }
    setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS, (OrderedSet) containers);
}
Also used : StringTokenizer(java.util.StringTokenizer) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) Iterator(java.util.Iterator)

Example 48 with CCActionTableModel

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

the class WSAuthNServicesViewBean method handleTblHandlersButtonDeleteRequest.

/**
     * Handles remove handler request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblHandlersButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
        tblValues.removeAll(selected);
        setPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, tblValues);
        populateHandlersTable(tblValues);
    }
    forwardTo();
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable)

Example 49 with CCActionTableModel

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

the class WSAuthNServicesViewBean method createHandlersTableModel.

private void createHandlersTableModel() {
    CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblWSAuthentication.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_HANDLERS_COL_KEY, "webservices.authentication.service.table.handlers.key");
    tblModel.setActionValue(TBL_HANDLERS_COL_CLASS, "webservices.authentication.service.table.handlers.class");
    tblModel.setActionValue(TBL_HANDLERS_ADD_BTN, "webservices.authentication.service.table.handlers.add.button");
    tblModel.setActionValue(TBL_HANDLERS_DELETE_BTN, "webservices.authentication.service.table.handlers.delete.button");
    propertySheetModel.setModel(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, tblModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 50 with CCActionTableModel

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

the class ServicesViewBean method createTableModel.

private void createTableModel() {
    tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblRMServices.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_BUTTON_ADD, "table.services.button.new");
    tblModel.setActionValue(TBL_BUTTON_DELETE, "table.services.button.delete");
    tblModel.setActionValue(TBL_COL_NAME, "table.services.name.column.name");
    tblModel.setActionValue(TBL_COL_ACTION, "table.services.action.column.name");
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Aggregations

CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)103 CCActionTable (com.sun.web.ui.view.table.CCActionTable)22 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)18 Iterator (java.util.Iterator)18 List (java.util.List)14 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)13 ArrayList (java.util.ArrayList)12 HashSet (java.util.HashSet)9 Set (java.util.Set)9 SerializedField (com.sun.identity.console.components.view.html.SerializedField)8 OptionList (com.iplanet.jato.view.html.OptionList)6 SMSubConfig (com.sun.identity.console.base.model.SMSubConfig)6 HashMap (java.util.HashMap)5 Map (java.util.Map)5 SCConfigModel (com.sun.identity.console.service.model.SCConfigModel)4 AuthPropertiesModel (com.sun.identity.console.authentication.model.AuthPropertiesModel)3 EntityModel (com.sun.identity.console.federation.model.EntityModel)2 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)2 FSSAMLServiceModel (com.sun.identity.console.federation.model.FSSAMLServiceModel)2 SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)2