public void forwardTo(RequestContext reqContext) throws NavigationException {
  HttpServletRequest req=reqContext.getRequest();
  String template=(String)req.getParameter("Template");
  if ((template != null) && template.equals("true")) {
    String operation=(String)req.getParameter("Op");
    AMServiceProfileViewBeanBase vb=null;
    if (operation.equals("add")) {
      vb=(AMServiceProfileViewBeanBase)getViewBean(ServicesAddViewBean.class);
    }
 else {
      vb=(AMServiceProfileViewBeanBase)getViewBean(ServicesEditViewBean.class);
      vb.setPageSessionAttribute(AMAdminConstants.SAVE_VB_NAME,"com.sun.identity.console.realm.ServicesViewBean");
    }
    vb.setPageSessionAttribute(AMAdminConstants.CURRENT_REALM,hexToString((String)req.getParameter("Location")));
    vb.setPageSessionAttribute(AMServiceProfileViewBeanBase.SERVICE_NAME,(String)req.getParameter("ServiceName"));
    passPgSessionMap(vb);
    vb.forwardTo(reqContext);
  }
 else {
    super.forwardTo(reqContext);
  }
}

public void forwardTo ( RequestContext reqContext ) throws NavigationException { HttpServletRequest req = reqContext . getRequest ( ) ; String template = ( String ) req . getParameter ( "Template" ) ; if ( ( template != null ) && template . equals ( "true" ) ) { String operation = ( String ) req . getParameter ( "Op" ) ; AMServiceProfileViewBeanBase vb = null ; if ( operation . equals ( "add" ) ) { vb = ( AMServiceProfileViewBeanBase ) getViewBean ( ServicesAddViewBean . class ) ; } else { vb = ( AMServiceProfileViewBeanBase ) getViewBean ( ServicesEditViewBean . class ) ; vb . setPageSessionAttribute ( AMAdminConstants . SAVE_VB_NAME , "com.sun.identity.console.realm.ServicesViewBean" ) ; } vb . setPageSessionAttribute ( AMAdminConstants . CURRENT_REALM , hexToString ( ( String ) req . getParameter ( "Location" ) ) ) ; vb . setPageSessionAttribute ( AMServiceProfileViewBeanBase . SERVICE_NAME , ( String ) req . getParameter ( "ServiceName" ) ) ; passPgSessionMap ( vb ) ; vb . forwardTo ( reqContext ) ; } else { super . forwardTo ( reqContext ) ; } }
forwards to template base creation and modification view bean .
