Search in sources :

Example 1 with AgentDumpModel

use of com.sun.identity.console.agentconfig.model.AgentDumpModel in project OpenAM by OpenRock.

the class AgentDumpViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    try {
        super.beginDisplay(event);
        setTitle();
        String universalId = (String) getPageSessionAttribute(AgentProfileViewBean.UNIVERSAL_ID);
        AgentDumpModel model = (AgentDumpModel) getModel();
        Map values = model.getAttributeValues(universalId);
        CCStaticTextField valuesText = (CCStaticTextField) getChild(STATICTEXT_VALUES);
        valuesText.setValue(getFormattedAttributes(values));
    } catch (AMConsoleException amce) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", amce.getMessage());
    }
}
Also used : AgentDumpModel(com.sun.identity.console.agentconfig.model.AgentDumpModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map) CCStaticTextField(com.sun.web.ui.view.html.CCStaticTextField)

Example 2 with AgentDumpModel

use of com.sun.identity.console.agentconfig.model.AgentDumpModel in project OpenAM by OpenRock.

the class AgentDumpViewBean method setTitle.

protected void setTitle() {
    AgentDumpModel model = (AgentDumpModel) getModel();
    String universalId = (String) getPageSessionAttribute(AgentProfileViewBean.UNIVERSAL_ID);
    try {
        String title = model.getLocalizedString("page.title.agent.dump");
        String displayName = model.getDisplayName(universalId);
        Object[] param = { displayName };
        ptModel.setPageTitleText(MessageFormat.format(title, param));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : AgentDumpModel(com.sun.identity.console.agentconfig.model.AgentDumpModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

AgentDumpModel (com.sun.identity.console.agentconfig.model.AgentDumpModel)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 CCStaticTextField (com.sun.web.ui.view.html.CCStaticTextField)1 Map (java.util.Map)1