question: 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 ( ) ; } } }
target:  Handles tab selected event.