Search in sources :

Example 61 with CCActionTable

use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.

the class IDFFSPViewBean method getAuthenticationContexts.

private IDFFAuthContexts getAuthenticationContexts() throws ModelControlException {
    CCActionTable tbl = (CCActionTable) getChild(TBL_AUTHENTICATION_CONTEXTS);
    tbl.restoreStateData();
    int size = 10;
    IDFFAuthContexts authContexts = new IDFFAuthContexts();
    for (int i = 0; i < size; i++) {
        tblAuthContextsModel.setLocation(i);
        String name = (String) tblAuthContextsModel.getValue(TBL_DATA_CONTEXT_REFERENCE);
        String supported = (String) tblAuthContextsModel.getValue(TBL_DATA_SUPPORTED);
        String level = (String) tblAuthContextsModel.getValue(TBL_DATA_LEVEL);
        authContexts.put(name, supported, level);
    }
    return authContexts;
}
Also used : CCActionTable(com.sun.web.ui.view.table.CCActionTable)

Example 62 with CCActionTable

use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.

the class AMPropertySheet method restoreStateData.

/**
     * Automates the restoring of store data in some children. This is required
     * for some special children such as <code>CCAddRemvoe</code>.
     *
     * @throws ModelControlException if cannot get model of property sheet.
     */
public void restoreStateData(Collection participatingChildren) throws ModelControlException {
    ViewBean parent = getParentViewBean();
    String[] names = parent == null ? null : parent.getChildNames();
    if ((names != null) && (names.length > 0)) {
        for (int i = 0; i < names.length; i++) {
            String name = names[i];
            if (participatingChildren.contains(name)) {
                View child = parent.getChild(name);
                if (CCAddRemove.class.isInstance(child)) {
                    ((CCAddRemove) child).restoreStateData();
                } else if (CCUnOrderedList.class.isInstance(child)) {
                    ((CCUnOrderedList) child).restoreStateData();
                } else if (CCMapList.class.isInstance(child)) {
                    ((CCMapList) child).restoreStateData();
                } else if (CCEditableList.class.isInstance(child)) {
                    ((CCEditableList) child).restoreStateData();
                } else if (CCOrderedList.class.isInstance(child)) {
                    ((CCOrderedList) child).restoreStateData();
                } else if (CCActionTable.class.isInstance(child)) {
                    ((CCActionTable) child).restoreStateData();
                }
            }
        }
    }
}
Also used : CCEditableList(com.sun.web.ui.view.editablelist.CCEditableList) CCMapList(com.sun.identity.console.ui.view.CCMapList) ViewBean(com.iplanet.jato.view.ViewBean) CCOrderedList(com.sun.identity.console.ui.view.CCOrderedList) CCActionTable(com.sun.web.ui.view.table.CCActionTable) View(com.iplanet.jato.view.View) ContainerView(com.iplanet.jato.view.ContainerView) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) CCUnOrderedList(com.sun.identity.console.ui.view.CCUnOrderedList)

Example 63 with CCActionTable

use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.

the class AMViewBeanBase method hideTableSelectionIcons.

/**
     * Hides the selection checkboxes in table.
     *
     * @param tableName Name of table.
     */
public void hideTableSelectionIcons(String tableName) {
    CCActionTable table = (CCActionTable) getChild(tableName);
    CCActionTableModelInterface model = table.getModel();
    model.setSelectionType(CCActionTableModelInterface.NONE);
}
Also used : CCActionTableModelInterface(com.sun.web.ui.model.CCActionTableModelInterface) CCActionTable(com.sun.web.ui.view.table.CCActionTable)

Example 64 with CCActionTable

use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.

the class EntitiesViewBean method createChild.

protected View createChild(String name) {
    View view = null;
    if (name.equals(TBL_SEARCH)) {
        populateTableModelEx();
        view = new CCActionTable(this, tblModel, name);
    } else if (name.equals(PAGETITLE)) {
        view = new CCPageTitle(this, ptModel, name);
    } else if (tblModel.isChildSupported(name)) {
        view = tblModel.createChild(this, name);
    } else if (ptModel.isChildSupported(name)) {
        view = ptModel.createChild(this, name);
    } else {
        view = super.createChild(name);
    }
    return view;
}
Also used : CCActionTable(com.sun.web.ui.view.table.CCActionTable) View(com.iplanet.jato.view.View) CCPageTitle(com.sun.web.ui.view.pagetitle.CCPageTitle)

Example 65 with CCActionTable

use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.

the class PolicyOpViewBeanBase method handleTblReferralsButtonDeleteRequest.

public void handleTblReferralsButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    CCActionTable table = (CCActionTable) getChild(TBL_REFERRALS);
    table.restoreStateData();
    try {
        CachedPolicy cachedPolicy = getCachedPolicy();
        Policy policy = cachedPolicy.getPolicy();
        Integer[] selected = tblReferralsModel.getSelectedRows();
        for (int i = 0; i < selected.length; i++) {
            tblReferralsModel.setRowIndex(selected[i].intValue());
            String name = (String) tblReferralsModel.getValue(TBL_REFERRALS_DATA_NAME);
            policy.removeReferral(name);
        }
        cachedPolicy.setPolicyModified(true);
        populateReferralsTable();
        forwardTo();
    } catch (AMConsoleException e) {
        debug.warning("PolicyOpViewBeanBase.handleTblReferralsButtonDeleteRequest", e);
        redirectToStartURL();
    }
}
Also used : Policy(com.sun.identity.policy.Policy) CachedPolicy(com.sun.identity.console.policy.model.CachedPolicy) CachedPolicy(com.sun.identity.console.policy.model.CachedPolicy) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

CCActionTable (com.sun.web.ui.view.table.CCActionTable)82 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)40 SerializedField (com.sun.identity.console.components.view.html.SerializedField)28 ArrayList (java.util.ArrayList)25 List (java.util.List)23 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)22 HashSet (java.util.HashSet)19 Set (java.util.Set)17 View (com.iplanet.jato.view.View)16 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)15 CCPageTitle (com.sun.web.ui.view.pagetitle.CCPageTitle)13 HashMap (java.util.HashMap)13 Map (java.util.Map)13 OptionList (com.iplanet.jato.view.html.OptionList)6 SMSubConfig (com.sun.identity.console.base.model.SMSubConfig)6 CachedPolicy (com.sun.identity.console.policy.model.CachedPolicy)5 ServerSiteModel (com.sun.identity.console.service.model.ServerSiteModel)5 Policy (com.sun.identity.policy.Policy)5 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)4 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)4