public void GetNodes()
    {
        XmlTree        xTree      = new XmlTree();
        ITreeService   treeParams = new TreeService(1099, "content", false, false, TreeDialogModes.none, null);
        TreeDefinition tree       = TreeDefinitionCollection.Instance.FindTree("content");
        BaseTree       instance   = tree.CreateInstance();

        instance.SetTreeParameters((ITreeService)treeParams);
        instance.Render(ref xTree);
        Response.ContentType = "application/json";
        Response.Write(((object)xTree).ToString());
    }
Beispiel #2
0
        /// <summary>
        /// This will load the particular ITree object and call it's render method to get the nodes that need to be rendered.
        /// </summary>
        /// <param name="appAlias"></param>
        /// <param name="treeAlias"></param>
        private void LoadTree(string treeAlias)
        {
            TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(treeAlias);

            if (treeDef != null)
            {
                BaseTree bTree = treeDef.CreateInstance();
                bTree.SetTreeParameters(m_treeParams);
                bTree.Render(ref m_xTree);
            }
            else
            {
                LoadNullTree();
            }
        }
        /// <summary>
        /// This will load the particular ITree object and call it's render method to get the nodes that need to be rendered.
        /// </summary>
        /// <param name="treeParams"></param>
        private void LoadTree(TreeRequestParams treeParams)
        {
            TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(treeParams.TreeType);

            if (treeDef != null)
            {
                BaseTree bTree = treeDef.CreateInstance();
                bTree.SetTreeParameters(treeParams);
                bTree.Render(ref _xTree);
            }
            else
            {
                LoadNullTree(treeParams);
            }
        }