Search in sources :

Example 1 with OAuth2Model

use of com.sun.identity.console.task.model.OAuth2Model in project OpenAM by OpenRock.

the class ConfigureOAuth2ViewBean method beginDisplay.

public void beginDisplay(DisplayEvent e) {
    try {
        OAuth2Model model = (OAuth2Model) getModel();
        Set realms = model.getRealms();
        CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
        menuRealm.setOptions(createOptionList(realms));
        String realm = getRequestContext().getRequest().getParameter("realm");
        if (realm != null && !realm.trim().isEmpty()) {
            setDisplayFieldValue(REALM, realm);
        }
        final String titleMessage = model.getLocalizedString(TITLE_MESSAGE);
        ptModel.setPageTitleText(MessageFormat.format(titleMessage, model.getDisplayName()));
        ptModel.setPageTitleHelpMessage(model.getLocalizedHelpMessage());
    } catch (AMConsoleException ex) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", ex.getMessage());
    }
}
Also used : Set(java.util.Set) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) OAuth2Model(com.sun.identity.console.task.model.OAuth2Model) CCDropDownMenu(com.sun.web.ui.view.html.CCDropDownMenu)

Aggregations

AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1 OAuth2Model (com.sun.identity.console.task.model.OAuth2Model)1 CCDropDownMenu (com.sun.web.ui.view.html.CCDropDownMenu)1 Set (java.util.Set)1