Search in sources :

Example 1 with MessageViewBean

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

the class MAPClientManagerViewBean method forwardTo.

/**
     * Forwards to Message View Bean if there are no profiles.
     *
     * @param reqContext Request Context.
     * @throws NavigationException if model object is not accessible.
     */
public void forwardTo(RequestContext reqContext) throws NavigationException {
    MAPServiceModel model = (MAPServiceModel) getModel();
    Set profileNames = model.getProfileNames();
    if ((profileNames == null) || profileNames.isEmpty()) {
        MessageViewBean vb = (MessageViewBean) getViewBean(MessageViewBean.class);
        vb.setMessage(CCAlert.TYPE_INFO, "message.information", "map.no.profiles");
        vb.forwardTo(reqContext);
    } else {
        super.forwardTo(reqContext);
    }
}
Also used : MAPServiceModel(com.sun.identity.console.service.model.MAPServiceModel) Set(java.util.Set) MessageViewBean(com.sun.identity.console.base.MessageViewBean)

Aggregations

MessageViewBean (com.sun.identity.console.base.MessageViewBean)1 MAPServiceModel (com.sun.identity.console.service.model.MAPServiceModel)1 Set (java.util.Set)1