Too Much Recursion

6 posts, 0 answers
  1. John Stephens
    John Stephens avatar
    1 posts
    Member since:
    Oct 2006

    Posted 07 Jan 2013 Link to this post

    When I bind to a remote data source that returns this data:

    [{"Id":1,"Name":"N0014E0","Devices":null},{"Id":2,"Name":"N0014E1","Devices":null}]

    I receive a Too Much Recursion Error.

    Modified code from the demo:


    var serviceRoot = "http://localhost:8211";
     
    homogeneous = new kendo.data.DataSource({
      transport: {
        read: {
          url: serviceRoot + "/reporting/JsonControllers",
          dataType: "jsonp"
          }
        },
        schema: {
          model: {
            id: "Id",
            name: "Name",
          }
        }
    });
     
    $("#treeview").kendoTreeView({
        dataSource: homogeneous,
        dataTextField: "Name"
    });
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 08 Jan 2013 Link to this post

    Hello John,

    In order to bind the treeview properly, you need to use a HierarchicalDataSource. Here is a jsbin sample that mocks the data and binds the treeview. I could not reproduce the "too much recursion" error, but it is something that we have encountered before and fixed it in the latest internal builds -- you can use them to address the issue.

    All the best,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. William
    William avatar
    2 posts
    Member since:
    Sep 2012

    Posted 18 Dec 2013 Link to this post

    I am trying to load data to a treeview but I get "too much recursion...f(this._isServerGrouped()){var i,o=t.toJSON();return e.length&&(i=e[e.length-1])..."
    The treeview is inside a bootstrap container, and browser is firefox.

    html
        <div class="container">
            <div class="row top-buffer">
                <div class="col-md-4 ">
                    <div class="treeview-back">
                        <div id="treeview111" style = "height:200px;" class="demo-section"></div>


    Javascript is:
    <script>
            var serviceRoot = "http://localhost:37790/Home";
            var homogeneous = new kendo.data.HierarchicalDataSource({
                transport: {
                    read: {
                        url: serviceRoot + "/GetIndicatorsGroups",
                        dataType: "jsonp"
                    }
                },
                schema: {
                    model: {
                        id: "GroupId",
                        hasChildren: "HasIndicators"
                    }
                }
            });

            $("#treeview111").kendoTreeView({
                dataSource: homogeneous,
                dataTextField: "FullName"
            });
    </script>

    Controller is:

            public JsonResult GetIndicatorsGroups()
            {
                var context = new DashboardEntities();
                context.Configuration.ProxyCreationEnabled = false;

                var query = context.DashIndicatorGroups.Include(i => i.DashIndicators)
                    .Select(group => new
                    {
                        GroupId = group.IndicatorGroupId,
                        FullName = group.Name,
                        HasIndicators = (group.DashIndicators.Count > 0)
                    });

                return Json(query, JsonRequestBehavior.AllowGet);
            }

    I hope somebody could help me with this issue.

    Regards
    William Castro
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 19 Dec 2013 Link to this post

    Hello William,

    Please provide a sample that shows the issue. Here is one to get you started.

    Regards,
    Alex Gyoshev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. William
    William avatar
    2 posts
    Member since:
    Sep 2012

    Posted 19 Dec 2013 Link to this post

    Alex, 

    I think i have a conflict between kendo.web.min.js and kendo.dataviz.min.js.
    Could you try in your sample adding following line, below  kendo.web.min.js, declaration 
        <script src="http://cdn.kendostatic.com/2013.3.1119/js/kendo.dataviz.min.js"></script>

    In my case it show "loading ... " when

    In my application ocurrs something like when I have 
        <script src="@Url.Content("~/Scripts/kendo/kendo.web.min.js")"></script>
        <script src="@Url.Content("~/Scripts/kendo/kendo.dataviz.min.js")"></script>
    and in addition show the error: 
    TypeError: s is undefined...tor(e);return function(e,n){var i=t(e),a=t(n);return i&&i.getTime&&a&&a.getTime&... in kendo.web.min.js

    http://jsbin.com/IlAtOLU/1/

    But when I delete the kendo.datavis.min.js  declaration it works !

    Thanks
    William Castro.
  6. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 19 Dec 2013 Link to this post

    Hello WIlliam,

    Yes, kendo.web.js and kendo.dataviz.js both include the core framework. If you want to use both of them on the same page, either use kendo.all or build a custom distribution through the custom download builder. See the javascript dependencies help topic about more information.

    Regards,
    Alex Gyoshev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top