public void activate(){
  if (!init)   init();
  if (m_mTab.isTreeTab() && m_mTab.getTabNo() != 0) {
    String keyColumnName=m_mTab.getKeyColumnName();
    String treeName="AD_Tree_ID";
    if (keyColumnName.startsWith("CM")) {
      if (keyColumnName.equals("CM_Container_ID"))       treeName="AD_TreeCMC_ID";
 else       if (keyColumnName.equals("CM_CStage_ID"))       treeName="AD_TreeCMS_ID";
 else       if (keyColumnName.equals("CM_Template_ID"))       treeName="AD_TreeCMT_ID";
 else       if (keyColumnName.equals("CM_Media_ID"))       treeName="AD_TreeCMM_ID";
    }
    int AD_Tree_ID=Env.getContextAsInt(Env.getCtx(),m_WindowNo,treeName,true);
    log.config(keyColumnName + " -> " + treeName+ " = "+ AD_Tree_ID);
    if (AD_Tree_ID == 0)     AD_Tree_ID=MTree.getDefaultAD_Tree_ID(Env.getAD_Client_ID(Env.getCtx()),m_mTab.getKeyColumnName());
    if (m_tree != null)     m_tree.initTree(AD_Tree_ID);
  }
  activateChilds();
}

public void activate ( ) { if ( ! init ) init ( ) ; if ( m_mTab . isTreeTab ( ) && m_mTab . getTabNo ( ) != 0 ) { String keyColumnName = m_mTab . getKeyColumnName ( ) ; String treeName = "AD_Tree_ID" ; if ( keyColumnName . startsWith ( "CM" ) ) { if ( keyColumnName . equals ( "CM_Container_ID" ) ) treeName = "AD_TreeCMC_ID" ; else if ( keyColumnName . equals ( "CM_CStage_ID" ) ) treeName = "AD_TreeCMS_ID" ; else if ( keyColumnName . equals ( "CM_Template_ID" ) ) treeName = "AD_TreeCMT_ID" ; else if ( keyColumnName . equals ( "CM_Media_ID" ) ) treeName = "AD_TreeCMM_ID" ; } int AD_Tree_ID = Env . getContextAsInt ( Env . getCtx ( ) , m_WindowNo , treeName , true ) ; log . config ( keyColumnName + " -> " + treeName + " = " + AD_Tree_ID ) ; if ( AD_Tree_ID == 0 ) AD_Tree_ID = MTree . getDefaultAD_Tree_ID ( Env . getAD_Client_ID ( Env . getCtx ( ) ) , m_mTab . getKeyColumnName ( ) ) ; if ( m_tree != null ) m_tree . initTree ( AD_Tree_ID ) ; } activateChilds ( ) ; }
activate grid controller . called by apanel when gridcontroller is displayed ( foreground )
