Search in sources :

Example 91 with CCActionTableModel

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

the class SCSOAPBindingViewBean method handleTblRequestHandlerListButtonDeleteRequest.

/**
     * Handles remove request handlers request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblRequestHandlerListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblValues);
        populateRequestHandlerListTable(tblValues);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        setPageSessionAttribute(PAGE_MODIFIED, "1");
    }
    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 92 with CCActionTableModel

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

the class SCSOAPBindingViewBean method createRequestHandlerListTableModel.

private void createRequestHandlerListTableModel() {
    CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblSOAPBindingRequestHandlerList.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_KEY, "soapBinding.service.table.requestHandlerList.key");
    tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_CLASS, "soapBinding.service.table.requestHandlerList.class");
    tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_ACTION, "soapBinding.service.table.requestHandlerList.action");
    tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_ADD_BTN, "soapBinding.service.table.requestHandlerList.add.button");
    tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_DELETE_BTN, "soapBinding.service.table.requestHandlerList.delete.button");
    propertySheetModel.setModel(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 93 with CCActionTableModel

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

the class SubConfigEditViewBean method handleTblSubConfigButtonDeleteRequest.

/**
     * Deletes sub configuration.
     *
     * @param event Request Invocation Event.
     * @throws ModelControlException if table model cannot be restored.
     */
public void handleTblSubConfigButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    CCActionTable tbl = (CCActionTable) getChild(AMPropertySheetModel.TBL_SUB_CONFIG);
    tbl.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) tbl.getModel();
    Integer[] selected = tblModel.getSelectedRows();
    SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
    List list = (List) szCache.getSerializedObj();
    Set names = new HashSet(selected.length * 2);
    for (int i = 0; i < selected.length; i++) {
        SMSubConfig sc = (SMSubConfig) list.get(selected[i].intValue());
        names.add(sc.getName());
    }
    try {
        SubConfigModel model = (SubConfigModel) getModel();
        model.deleteSubConfigurations(names);
        if (selected.length == 1) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "subconfig.message.deleted");
        } else {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "subconfig.message.deleted.pural");
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    submitCycle = false;
    forwardTo();
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) SerializedField(com.sun.identity.console.components.view.html.SerializedField) SMSubConfig(com.sun.identity.console.base.model.SMSubConfig) SubConfigModel(com.sun.identity.console.service.model.SubConfigModel) ArrayList(java.util.ArrayList) List(java.util.List) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashSet(java.util.HashSet)

Example 94 with CCActionTableModel

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

the class ConfigureSalesForceAppsViewBean method createAttrMappingTable.

private void createAttrMappingTable() {
    tableModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/attributesMappingTable.xml"));
    tableModel.setTitleLabel("");
    tableModel.setActionValue("deleteAttrMappingBtn", "configure.provider.attributesmapping.delete.button");
    tableModel.setActionValue("NameColumn", "configure.provider.attributesmapping.column.name");
    tableModel.setActionValue("AssertionColumn", "configure.provider.attributesmapping.column.assertion");
    propertySheetModel.setModel("tblattrmapping", tableModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 95 with CCActionTableModel

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

the class CreateHostedSPViewBean method createAttrMappingTable.

private void createAttrMappingTable() {
    tableModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/attributesMappingTable.xml"));
    tableModel.setTitleLabel("");
    tableModel.setActionValue("deleteAttrMappingBtn", "configure.provider.attributesmapping.delete.button");
    tableModel.setActionValue("NameColumn", "configure.provider.attributesmapping.column.name");
    tableModel.setActionValue("AssertionColumn", "configure.provider.attributesmapping.column.assertion");
    propertySheetModel.setModel("tblattrmapping", tableModel);
}
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