use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class ServerEditViewBeanBase method nodeClicked.
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
public void nodeClicked(RequestInvocationEvent event, int nodeID) {
AMViewConfig amconfig = AMViewConfig.getInstance();
try {
AMViewBeanBase vb = getTabNodeAssociatedViewBean("cscGeneral", nodeID);
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
debug.error("ServerEditGeneralViewBean.nodeClicked", e);
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method handleButton3Request.
/**
* Handles the "Back to" page request. Essentially this is just canceling
* the page and returning to the previous page. Same as a cancel request
* from the create page.
*
* @param event Request Invocation Event.
*/
public void handleButton3Request(RequestInvocationEvent event) {
AMViewBeanBase vb = getReturnToViewBean();
backTrail();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class AgentsViewBean method nodeClicked.
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
public void nodeClicked(RequestInvocationEvent event, int nodeID) {
boolean forwardTo = false;
String strNodeId = Integer.toString(nodeID);
if (strNodeId.length() > 2) {
String prefix = strNodeId.substring(0, 2);
if (prefix.equals(AMAdminConstants.TAB_AGENT_PREFIX)) {
setPageSessionAttribute(getTrackingTabIDName(), Integer.toString(nodeID));
AMViewConfig amconfig = AMViewConfig.getInstance();
List list = amconfig.getSupportedAgentTypes(getModel());
strNodeId = strNodeId.substring(2);
int idx = Integer.parseInt(strNodeId);
if (idx < list.size()) {
setPageSessionAttribute(PG_SESSION_AGENT_TYPE, (String) list.get(idx));
AMPostViewBean vb = (AMPostViewBean) getViewBean(AMPostViewBean.class);
passPgSessionMap(vb);
vb.setTargetViewBeanURL("../agentconfig/Agents");
vb.forwardTo(getRequestContext());
forwardTo = true;
}
}
}
if (!forwardTo) {
try {
AMViewBeanBase vb = getTabNodeAssociatedViewBean("realms", nodeID);
String tmp = (String) getPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM);
vb.setPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM, tmp);
tmp = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
vb.setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, tmp);
tmp = (String) getPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID);
vb.setPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID, tmp);
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
debug.error("AgentViewBean.nodeClicked", e);
forwardTo();
}
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class GenericAgentProfileViewBean method nodeClicked.
/**
* Handles tab selection.
*
* @param event Request Invocation Event.
* @param nodeID Tab Id.
*/
public void nodeClicked(RequestInvocationEvent event, int nodeID) {
String agentType = getAgentType();
AgentTabManager mgr = AgentTabManager.getInstance();
boolean forward = false;
if (nodeID == TAB_GENERAL_ID) {
removePageSessionAttribute(PS_TABNAME);
setPageSessionAttribute(getTrackingTabIDName(), Integer.toString(nodeID));
} else if (nodeID == TAB_GROUP_ID) {
AgentGroupMembersViewBean vb = (AgentGroupMembersViewBean) getViewBean(AgentGroupMembersViewBean.class);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
forward = true;
} else {
List tabs = mgr.getTabs(agentType);
String strIdx = Integer.toString(nodeID);
strIdx = strIdx.substring(TAB_PREFIX.length());
int idx = Integer.parseInt(strIdx);
String tabName = (String) tabs.get(idx);
setPageSessionAttribute(PS_TABNAME, tabName);
setPageSessionAttribute(getTrackingTabIDName(), Integer.toString(nodeID));
}
if (!forward) {
try {
Class clazz = AgentsViewBean.getAgentCustomizedViewBean(agentType);
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(clazz);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class ServicesEditViewBean method forwardToServicesViewBean.
protected void forwardToServicesViewBean() {
AMViewBeanBase vb = getCallingView();
if (vb != null) {
backTrail();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} else {
forwardTo();
}
}
Aggregations