Search in sources :

Example 56 with CCActionTableModel

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

the class RealmResourceOfferingViewBean method createTableModel.

protected void createTableModel() {
    tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblRealmResourceOffering.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_BUTTON_ADD, "table.realm.resource.offerings.button.new");
    tblModel.setActionValue(TBL_BUTTON_DELETE, "table.realm.resource.offerings.button.delete");
    tblModel.setActionValue(TBL_COL_SERVICE_TYPE, "table.realm.resource.offerings.column.service.name");
    tblModel.setActionValue(TBL_COL_ABSTRACT, "table.realm.resource.offerings.column.abstract");
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 57 with CCActionTableModel

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

the class SCPolicyViewBean method populateResourceComparatorTable.

private void populateResourceComparatorTable(Set resourceComp) {
    tablePopulated = true;
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
    tblModel.clearAll();
    boolean firstEntry = true;
    int counter = 0;
    for (Iterator iter = resourceComp.iterator(); iter.hasNext(); ) {
        String c = (String) iter.next();
        PolicyResourceComparator comp = new PolicyResourceComparator(c);
        if (!firstEntry) {
            tblModel.appendRow();
        } else {
            firstEntry = false;
        }
        tblModel.setValue(TBL_RESOURCE_COMPARATOR_DATA_NAME, comp.getServiceType());
        tblModel.setValue(TBL_RESOURCE_COMPARATOR_HREF_ACTION, Integer.toString(counter));
        tblModel.setValue(TBL_RESOURCE_COMPARATOR_LABEL_ACTION, "policy.service.table.resource.comparator.action.edit.label");
        counter++;
    }
    setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, (OrderedSet) resourceComp);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) Iterator(java.util.Iterator) PolicyResourceComparator(com.sun.identity.console.service.model.PolicyResourceComparator)

Example 58 with CCActionTableModel

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

the class SCPolicyViewBean method handleTblResourceComparatorButtonDeleteRequest.

/**
     * Handles remove resource comparator request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblResourceComparatorButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    CCActionTable table = (CCActionTable) getChild(TBL_RESOURCE);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, tblValues);
        populateResourceComparatorTable(tblValues);
    }
    try {
        Map values = getAllValues();
        setPageSessionAttribute(PROPERTY_ATTRIBUTE, (HashMap) values);
        setPageSessionAttribute(SCPolicyViewBean.PAGE_MODIFIED, "1");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    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) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 59 with CCActionTableModel

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

the class SCConfigAuthViewBean method createTableModels.

protected void createTableModels() {
    SCConfigModel model = (SCConfigModel) getModel();
    tblModelAuth = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblSCConfigAuth.xml"));
    List svcNames = model.getServiceNames(SEC_AUTH);
    populateTableModel(tblModelAuth, svcNames, SEC_AUTH);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) SCConfigModel(com.sun.identity.console.service.model.SCConfigModel) List(java.util.List)

Example 60 with CCActionTableModel

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

the class MAPClientManagerViewBean method createTableModel.

private void createTableModel() {
    tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblMAPClientDetection.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setMaxRows(getModel().getPageSize());
    tblModel.setActionValue(TBL_COL_NAME, "table.clientDetection.client.column.name");
    tblModel.setActionValue(TBL_COL_ACTION, "table.clientDetection.action.column.name");
    tblModel.setActionValue(TBL_BUTTON_ADD, "clientDetection.newDevice.button");
}
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