Search in sources :

Example 11 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class AMServiceProfileViewBeanBase method createTwoButtonPageTitleModel.

protected void createTwoButtonPageTitleModel() {
    ptModel = new CCPageTitleModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/twoBtnsPageTitle.xml"));
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();
    if (model != null) {
        ptModel.setPageTitleText(model.getPageTitle());
        ptModel.setValue("button1", "button.save");
        ptModel.setValue("button2", "button.reset");
    }
}
Also used : CCPageTitleModel(com.sun.web.ui.model.CCPageTitleModel) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 12 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class AMServiceProfileViewBeanBase method createThreeButtonPageTitleModel.

protected void createThreeButtonPageTitleModel() {
    ptModel = new CCPageTitleModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/threeBtnsPageTitle.xml"));
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();
    if (model != null) {
        ptModel.setPageTitleText(model.getPageTitle());
        ptModel.setValue("button1", "button.save");
        ptModel.setValue("button2", "button.reset");
        ptModel.setValue("button3", getBackButtonLabel());
    }
}
Also used : CCPageTitleModel(com.sun.web.ui.model.CCPageTitleModel) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 13 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class AMServiceProfileViewBeanBase method handleButton1Request.

/**
     * Handles save request.
     *
     * @param event Request invocation event.
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();
    if (model != null) {
        try {
            Map values = getValues();
            onBeforeSaveProfile(values);
            model.setAttributeValues(values);
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
        } catch (AMConsoleException e) {
            setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        }
    }
    forwardTo();
}
Also used : AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel) HashMap(java.util.HashMap) Map(java.util.Map)

Example 14 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class SCSAML2SOAPBindingViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_REQUEST_HANDLER_LIST_DELETE_BTN);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set handlers = new OrderedSet();
                handlers.addAll(model.getAttributeValues(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST));
                populateRequestHandlerListTable(handlers);
            }
        }
    }
    if (!isInlineAlertMessageSet()) {
        String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
        if ((flag != null) && flag.equals("1")) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 15 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class SCSOAPBindingViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_REQUEST_HANDLER_LIST_DELETE_BTN);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set handlers = new OrderedSet();
                handlers.addAll(model.getAttributeValues(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST));
                populateRequestHandlerListTable(handlers);
            }
        }
    }
    if (!isInlineAlertMessageSet()) {
        String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
        if ((flag != null) && flag.equals("1")) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Aggregations

AMServiceProfileModel (com.sun.identity.console.base.model.AMServiceProfileModel)16 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)6 Map (java.util.Map)6 Set (java.util.Set)6 HashMap (java.util.HashMap)5 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 CCPageTitleModel (com.sun.web.ui.model.CCPageTitleModel)2 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1