Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • denisedelbando 141 posts 339 karma points
    Oct 21, 2013 @ 17:01
    denisedelbando
    0

    Different parameters to TreeDataService

    I am creating my own custom section with trees. Unfortunately i am stuck on creating trees.

    They are not showing up. I was following this tutorial http://www.nibble.be/?p=250

    Now i looked at the javascript console and found that the variable app is not passed but instead treeType is sent.

    Does anyone know why? if i change the treeType to app=settings i get the correct json.

    TreeDataService.ashx?rnd=e3eca7b380b5445eaba9eb0785b30ef7&id=-1&treeType=exampleTree&contextMenu=true&isDialog=false&rnd2=84.2

    This what gets inserted in tree.config

     

    and just to make sure i wasn't crazy, i looked at settings -> stylesheets and the TreeDataService is

    TreeDataService.ashx?rnd=a728fea6e52e4e73af7022bead28d34d&id=-1&contextMenu=true&isDialog=false&app=settings&rnd2=67

    Here is my code

    [Tree("settings", "exampleTree", "Example")]

     

       public class LoadTableData : BaseTree

       {

          public LoadTableData(string application)

             : base(application)

          {

          }

     

     

          protected override void CreateRootNode(ref XmlTreeNode rootNode)

          {

             rootNode.Icon = FolderIcon;

             rootNode.OpenIcon = FolderIconOpen;

            

             //rootNode.NodeID = "init";

             rootNode.NodeType = "example";

             rootNode.NodeID = "init";

          }

     

          public override void Render(ref XmlTree tree)

          {

             IList<cFitnessClass> classList = FitnessClassBLL.GetActiveClasses();

             foreach (cFitnessClass cfc in classList)

             {

                XmlTreeNode dNode = XmlTreeNode.Create(this);

                dNode.NodeID = cfc.ID.ToString();

                dNode.Text = cfc.ClassName;

                dNode.NodeType = "cFitnessClass";

                dNode.Action = "javascript:openFitnessClass(" + cfc.ID.ToString() + ")";

              

                tree.Add(dNode);

               

             }

     

          }

     

          public override void RenderJS(ref System.Text.StringBuilder Javascript)

          {

             Javascript.Append(

                @"function openFitnessClass(id) {

                     UmbClientMgr.contentFrame('../App_Plugins/UmbracoMVCBackofficePages/Index?id='+id);

                    }");

          }

     

       }

     

     

    any help would be greatly appreciated.

     

    thank you

     

  • denisedelbando 141 posts 339 karma points
    Oct 21, 2013 @ 17:26
    denisedelbando
    0

    Alright, i saw that some areas have treeType. can anyone point out what i am doing wrong? or what i am missing

  • denisedelbando 141 posts 339 karma points
    Oct 21, 2013 @ 19:58
    denisedelbando
    100

    Holy.... i just needed an ICON!. this is solved now.

Please Sign in or register to post replies

Write your reply to:

Draft