use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class SMProfileViewBean method addSessionsTab.
// Assign the Session SubTabs
protected void addSessionsTab(SMProfileModel model, int selectedNode) {
AMViewConfig config = AMViewConfig.getInstance();
config.addSessionTabs(tabModel, model);
registerChild(TAB_COMMON, CCTabs.class);
tabModel.setSelectedNode(selectedNode);
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class AgentsViewBean method createTableModel.
private void createTableModel() {
String agentType = getDisplayIDType();
AMViewConfig viewCfg = AMViewConfig.getInstance();
combinedType = viewCfg.isCombineAgentType(agentType);
centralizable = agentType.equals(AgentConfiguration.AGENT_TYPE_J2EE) || agentType.equals(AgentConfiguration.AGENT_TYPE_WEB);
String xml = null;
if (centralizable) {
xml = "com/sun/identity/console/tblAgentsJ2EEWebAgent.xml";
} else if (combinedType) {
xml = "com/sun/identity/console/tblAgentsCombined.xml";
} else {
xml = "com/sun/identity/console/tblAgents.xml";
}
tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream(xml));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_BUTTON_ADD, "table.agents.button.new");
tblModel.setActionValue(TBL_BUTTON_DELETE, "table.agents.button.delete");
tblModel.setActionValue(TBL_COL_NAME, "table.agents.name.column.name");
tblModel.setActionValue(TBL_COL_LOCAL, "table.agents.name.column.repo");
if (combinedType) {
tblModel.setActionValue(TBL_COL_TYPE, "table.agents.name.column.type");
}
xml = (!combinedType) ? "com/sun/identity/console/tblAgentGroups.xml" : "com/sun/identity/console/tblAgentGroupsCombined.xml";
tblGroupModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream(xml));
tblGroupModel.setTitleLabel("label.items");
tblGroupModel.setActionValue(TBL_BUTTON_ADD_GROUP, "table.agent.groups.button.new");
tblGroupModel.setActionValue(TBL_BUTTON_DELETE_GROUP, "table.agent.groups.button.delete");
tblGroupModel.setActionValue(TBL_COL_NAME_GROUP, "table.agent.groups.name.column.name");
if (combinedType) {
tblGroupModel.setActionValue(TBL_COL_TYPE_GROUP, "table.agent.groups.name.column.type");
}
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class EntitiesViewBean method addEntitiesTab.
private void addEntitiesTab() {
EntitiesModel model = (EntitiesModel) getModel();
String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
AMViewConfig config = AMViewConfig.getInstance();
config.addEntityTabs(tabModel, curRealm, model);
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class RMRealmViewBean method handleTblDataActionHrefRequest.
/**
* Handles edit realm request.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
public void handleTblDataActionHrefRequest(RequestInvocationEvent event) throws ModelControlException {
// store the current realm name and the current selected tab
// in the page session. Need to do this so after returning
// from profile object we get placed in the correct location.
String prevRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
setPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM, prevRealm);
String newRealm = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF));
setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, newRealm);
setCurrentLocation(newRealm);
// store the current selected tab in the page session
String tmp = (String) getPageSessionAttribute(getTrackingTabIDName());
setPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID, tmp);
AMViewConfig config = AMViewConfig.getInstance();
RMRealmModel model = (RMRealmModel) getModel();
unlockPageTrail();
try {
AMViewBeanBase vb = config.getTabViewBean(this, newRealm, model, "realms", -1, -1);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, prevRealm);
removePageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID);
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class RealmPropertiesBase method createTabModel.
protected void createTabModel() {
if (tabModel == null) {
AMViewConfig amconfig = AMViewConfig.getInstance();
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_PROFILE);
if (realmName != null) {
tabModel = amconfig.getTabsModel("realms", realmName, getRequestContext().getRequest());
registerChild(TAB_COMMON, CCTabs.class);
}
}
}
Aggregations