HttpSession session)
throws Exception {
TreeControl control = (TreeControl) session.getAttribute("treeControlTest");
if (control != null) {
TreeControlNode parentNode = control.findNode(parentName);
if (parentNode != null) {
String path = oname.getKeyProperty("path");
String nodeLabel = "Context (" + path + ")";
String encodedName = URLEncoder.encode(oname.toString());
TreeControlNode childNode =
new TreeControlNode(oname.toString(),
"Context.gif",
nodeLabel,
"EditContext.do?select=" +
encodedName,
"content",
true);
parentNode.addChild(childNode);
// FIXME - force a redisplay
String type = oname.getKeyProperty("type");
if (type == null) {
type = "";
}
if (path == null) {
path = "";
}
String host = oname.getKeyProperty("host");
if (host == null) {
host = "";
}
String service = oname.getKeyProperty("service");
TreeControlNode subtree = new TreeControlNode
("Context Resource Administration " + containerName,
"folder_16_pad.gif",
resources.getMessage("resources.treeBuilder.subtreeNode"),
null,
"content",
true);
childNode.addChild(subtree);
TreeControlNode datasources = new TreeControlNode
("Context Data Sources " + containerName,
"Datasource.gif",
resources.getMessage("resources.treeBuilder.datasources"),
"resources/listDataSources.do?resourcetype=" +
URLEncoder.encode(type) + "&path=" +
URLEncoder.encode(path) + "&host=" +
URLEncoder.encode(host) + "&service=" +
URLEncoder.encode(service) + "&forward=" +
URLEncoder.encode("DataSources List Setup"),
"content",
false);
TreeControlNode mailsessions = new TreeControlNode
("Context Mail Sessions " + containerName,
"Mailsession.gif",
resources.getMessage("resources.treeBuilder.mailsessions"),
"resources/listMailSessions.do?resourcetype=" +
URLEncoder.encode(type) + "&path=" +
URLEncoder.encode(path) + "&host=" +
URLEncoder.encode(host) + "&service=" +
URLEncoder.encode(service) + "&forward=" +
URLEncoder.encode("MailSessions List Setup"),
"content",
false);
TreeControlNode resourcelinks = new TreeControlNode
("Resource Links " + containerName,
"ResourceLink.gif",
resources.getMessage("resources.treeBuilder.resourcelinks"),
"resources/listResourceLinks.do?resourcetype=" +
URLEncoder.encode(type) + "&path=" +
URLEncoder.encode(path) + "&host=" +
URLEncoder.encode(host) + "&service=" +
URLEncoder.encode(service) + "&forward=" +
URLEncoder.encode("ResourceLinks List Setup"),
"content",
false);
TreeControlNode envs = new TreeControlNode
("Context Environment Entries "+ containerName,
"EnvironmentEntries.gif",
resources.getMessage("resources.env.entries"),
"resources/listEnvEntries.do?resourcetype=" +
URLEncoder.encode(type) + "&path=" +