I don't know if this is a problem with my tree loader, but when I switch back and fourth between my custom section and the content section, each time the text of the individual tree nodes is appended with the combined text of my treenodes. So I have to refresh the browser to get the right text again. Here is my treeloader:
public class DeploymentLoader : BaseTree { public DeploymentLoader(string application) : base(application) {
public override void Render(ref XmlTree Tree) { var createDeploymentPackage = XmlTreeNode.Create(this); createDeploymentPackage.Text = "Create Deployment Package"; createDeploymentPackage.Icon = "docPic.gif"; createDeploymentPackage.Action = "javascript:openCreateDeploymentPackage()"; // Add the node to the tree Tree.Add(createDeploymentPackage);
var installDeploymentPackage = XmlTreeNode.Create(this); installDeploymentPackage.Text = "Install Deployment Package"; installDeploymentPackage.Icon = "docPic.gif"; installDeploymentPackage.Action = "javascript:openInstallDeploymentPackage()"; // Add the node to the tree Tree.Add(installDeploymentPackage); }
public override void RenderJS(ref StringBuilder Javascript) { Javascript.Append(@" function openCreateDeploymentPackage() { parent.right.document.location.href = '/handlers/BuildPackage.aspx'; } ");
Custom section messes up on secondary loads
I don't know if this is a problem with my tree loader, but when I switch back and fourth between my custom section and the content section, each time the text of the individual tree nodes is appended with the combined text of my treenodes. So I have to refresh the browser to get the right text again. Here is my treeloader:
public class DeploymentLoader : BaseTree
{
public DeploymentLoader(string application) : base(application)
{
}
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
rootNode.Icon = FolderIcon;
rootNode.OpenIcon = FolderIconOpen;
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
public override void Render(ref XmlTree Tree)
{
var createDeploymentPackage = XmlTreeNode.Create(this);
createDeploymentPackage.Text = "Create Deployment Package";
createDeploymentPackage.Icon = "docPic.gif";
createDeploymentPackage.Action = "javascript:openCreateDeploymentPackage()";
// Add the node to the tree
Tree.Add(createDeploymentPackage);
var installDeploymentPackage = XmlTreeNode.Create(this);
installDeploymentPackage.Text = "Install Deployment Package";
installDeploymentPackage.Icon = "docPic.gif";
installDeploymentPackage.Action = "javascript:openInstallDeploymentPackage()";
// Add the node to the tree
Tree.Add(installDeploymentPackage);
}
public override void RenderJS(ref StringBuilder Javascript)
{
Javascript.Append(@"
function openCreateDeploymentPackage() {
parent.right.document.location.href = '/handlers/BuildPackage.aspx';
}
");
Javascript.Append(@"
function openInstallDeploymentPackage() {
parent.right.document.location.href = '/handlers/InstallPackage.aspx';
}
");
}
}
is working on a reply...