use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class ServerConfigXMLViewBean method nodeClicked.
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
public void nodeClicked(RequestInvocationEvent event, int nodeID) {
try {
AMViewBeanBase vb = getTabNodeAssociatedViewBean("cscGeneral", nodeID);
String 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("ServerEditGeneralViewBean.nodeClicked", e);
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class ServerSiteViewBean method forwardToServerProfilePage.
private void forwardToServerProfilePage(String serverName) {
setPageSessionAttribute(ServerEditGeneralViewBean.PG_ATTR_SERVER_NAME, serverName);
String tabIdx = (String) getPageSessionAttribute(ServerEditGeneralViewBean.TAB_TRACKER);
int idxTab = 421;
if (tabIdx != null) {
idxTab = Integer.parseInt(tabIdx);
}
AMViewConfig config = AMViewConfig.getInstance();
try {
AMViewBeanBase vb = config.getTabViewBean(this, "/", getModel(), ServerEditGeneralViewBean.TAB_NAME, idxTab, -1);
unlockPageTrail();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method handleButton2Request.
/**
* Handles cancel request.
*
* @param event Request Invocation Event.
*/
public void handleButton2Request(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 handleTblDataActionHrefRequest.
/**
* Forwards request to edit agent view bean.
*
* @param event Request Invocation Event.
*/
public void handleTblDataActionHrefRequest(RequestInvocationEvent event) {
AgentsModel model = (AgentsModel) getModel();
String agentType = getDisplayIDType();
String universalId = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF));
setPageSessionAttribute(AgentProfileViewBean.UNIVERSAL_ID, universalId);
SSOToken ssoToken = model.getUserSSOToken();
String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
StringTokenizer st = new StringTokenizer(universalId, "=,");
st.nextToken();
String agentName = st.nextToken();
try {
AMIdentity amid = new AMIdentity(ssoToken, agentName, IdType.AGENTONLY, realm, null);
if (agentType.equals(AgentsViewBean.AGENT_WEB) || (agentType.equals(AgentsViewBean.DEFAULT_ID_TYPE))) {
if (isPropertiesLocallyStored(amid)) {
setPageSessionAttribute(LOCAL_OR_NOT, PROP_LOCAL);
} else {
setPageSessionAttribute(LOCAL_OR_NOT, PROP_CENTRAL);
}
}
Class clazz = getAgentCustomizedViewBean(model.getAgentType(amid));
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(clazz);
setPageSessionAttribute(PG_SESSION_SUPERCEDE_AGENT_TYPE, model.getAgentType(amid));
removePageSessionAttribute(GenericAgentProfileViewBean.PS_TABNAME);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (IdRepoException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (SSOException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class EntitiesViewBean method handleTblDataActionHrefRequest.
/**
* Forwards request to edit policy view bean.
*
* @param event Request Invocation Event.
*/
public void handleTblDataActionHrefRequest(RequestInvocationEvent event) {
EntitiesModel model = (EntitiesModel) getModel();
String universalId = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF));
setPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID, universalId);
try {
AMIdentity amid = IdUtils.getIdentity(model.getUserSSOToken(), universalId);
String idType = amid.getType().getName();
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(EntityEditViewBean.class);
setPageSessionAttribute(EntityOpViewBeanBase.ENTITY_NAME, amid.getName());
setPageSessionAttribute(EntityOpViewBeanBase.ENTITY_TYPE, idType);
unlockPageTrail();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (IdRepoException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
}
}
Aggregations