Search in sources :

Example 1 with CCActionTableModel

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

the class AMPropertySheetModel method registerChildren.

public void registerChildren(ContainerViewBase view) {
    super.registerChildren(view);
    for (Iterator i = childMap.keySet().iterator(); i.hasNext(); ) {
        String name = (String) i.next();
        String tagName = (String) childMap.get(name);
        if (tagName != null) {
            if (tagName.equals(ORDERED_LIST)) {
                view.registerChild(name, CCOrderedList.class);
            } else if (tagName.equals(UNORDERED_LIST)) {
                view.registerChild(name, CCUnOrderedList.class);
            } else if (tagName.equals(MAP_LIST)) {
                view.registerChild(name, CCMapList.class);
            } else if (tagName.equals(GLOBAL_MAP_LIST)) {
                view.registerChild(name, CCGlobalMapList.class);
            } else if (tagName.equals(EDITABLE_LIST)) {
                view.registerChild(name, CCEditableList.class);
            }
        }
    }
    if (hasSubConfigTable) {
        CCActionTableModel model = createSubConfigActionTableModel();
        model.registerChildren(view);
    }
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) Iterator(java.util.Iterator) CCGlobalMapList(com.sun.identity.console.ui.view.CCGlobalMapList) CCUnOrderedList(com.sun.identity.console.ui.view.CCUnOrderedList)

Example 2 with CCActionTableModel

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

the class RuleOpViewBeanBase method createTableModels.

private void createTableModels() {
    tblActionsModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblPMRulesActions.xml"));
    tblActionsModel.setTitleLabel("label.items");
    tblActionsModel.setActionValue(TBL_ACTIONS_COL_NAME, "policy.rules.actions.table.column.name");
    tblActionsModel.setActionValue(TBL_ACTIONS_COL_VALUE, "policy.rules.actions.table.column.value");
    tblActionsModel.setModel(TBL_ACTIONS_EDITABLE_LIST, new CCEditableListModel());
    propertySheetModel.setModel(TBL_ACTIONS, tblActionsModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCEditableListModel(com.sun.web.ui.model.CCEditableListModel)

Example 3 with CCActionTableModel

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

the class SMG11NViewBean method populateSupportedCharsetsTable.

private void populateSupportedCharsetsTable(Set charsets) {
    tablePopulated = true;
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
    tblModel.clearAll();
    boolean firstEntry = true;
    int counter = 0;
    for (Iterator iter = charsets.iterator(); iter.hasNext(); ) {
        String c = (String) iter.next();
        LocaleSupportedCharsetsEntry entry = new LocaleSupportedCharsetsEntry(c);
        if (entry.isValid()) {
            if (!firstEntry) {
                tblModel.appendRow();
            } else {
                firstEntry = false;
            }
            tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_LOCALE, entry.strLocale);
            tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_CHARSETS, entry.strCharsets);
            tblModel.setValue(TBL_SUPPORTED_CHARSETS_HREF_ACTION, Integer.toString(counter));
        }
        counter++;
    }
    setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, (OrderedSet) charsets);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) Iterator(java.util.Iterator) LocaleSupportedCharsetsEntry(com.sun.identity.console.service.model.LocaleSupportedCharsetsEntry)

Example 4 with CCActionTableModel

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

the class SMG11NViewBean method createSupportedCharsetsTableModel.

private void createSupportedCharsetsTableModel() {
    CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblG11NSupportedCharsets.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_COL_LOCALE, "globalization.service.table.SupportedCharsets.locale");
    tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_COL_CHARSETS, "globalization.service.table.SupportedCharsets.charsets");
    tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_ADD_BTN, "globalization.service.table.SupportedCharsets.add.button");
    tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_DELETE_BTN, "globalization.service.table.SupportedCharsets.delete.button");
    propertySheetModel.setModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, tblModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 5 with CCActionTableModel

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

the class SMG11NViewBean method handleTblCharsetAliasButtonDeleteRequest.

/**
     * Handles remove charset alias request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblCharsetAliasButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS, tblValues);
        populateCharsetAliasTable(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)

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