1 25 26 package org.objectweb.jonas.webapp.jonasadmin.catalina; 27 28 import javax.servlet.http.HttpServletRequest ; 29 30 import org.objectweb.jonas.webapp.jonasadmin.JonasTreeBuilder; 31 import org.objectweb.jonas.webapp.jonasadmin.WhereAreYou; 32 import org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction; 33 import org.objectweb.jonas.webapp.taglib.TreeControl; 34 import org.objectweb.jonas.webapp.taglib.TreeControlNode; 35 36 39 abstract public class CatalinaBaseAction extends BaseDeployAction { 40 41 48 protected void refreshTree(HttpServletRequest p_Request) 49 throws Exception { 50 refreshConnectorsTree(p_Request); 52 refreshMBeansTree(); 54 m_WhereAreYou.setTreeToRefresh(true); 56 } 57 58 64 protected void refreshConnectorsTree(HttpServletRequest p_Request) 65 throws Exception { 66 String sCurrentNodeNameItem = getTreeBranchName(DEPTH_SERVER) 68 + WhereAreYou.NODE_SEPARATOR + "protocols" 69 + WhereAreYou.NODE_SEPARATOR + "connectors"; 70 TreeControl oControl = m_WhereAreYou.getTreeControl(); 72 TreeControlNode oBranchRootNode = oControl.findNode(sCurrentNodeNameItem); 74 oControl.enableAutoRefresh(); 76 TreeControlNode[] aoNodes = oBranchRootNode.findChildren(); 78 for (int i = 0; i < aoNodes.length; i++) { 79 aoNodes[i].remove(); 80 } 81 JonasTreeBuilder oBuilder = new JonasTreeBuilder(); 83 oBuilder.getCatalinaDetailConnectors(oBranchRootNode, m_Resources, p_Request); 84 oControl.disableAutoRefresh(); 86 } 87 88 } 89 | Popular Tags |