Copied to clipboard

Flag this post as spam?

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


  • Chester Campbell 65 posts 123 karma points
    Feb 17, 2014 @ 23:44
    Chester Campbell
    2

    Reloading custom tree problems (UKFest Angular JS Demo)

    Hi,

    I have Per's UKFest Angular JS Demo installed in an Umbraco 7.0.3 site. I have run into a problem when reloading the custom tree after a user has clicked the "Drink" or "Detox" buttons in the alternate dialog windows.

    The error I'm getting back is "No childNodesUrl property found on the tree node, cannot load child nodes".

    I think this is happening because the node being passed to the reloadNodes() method is not a valid node.

    In App_Plugins\People\backoffice\peopletree\dialogs.controller.js on line 6 is:

    navigationService.reloadNode($scope.currentNode.parent);
    

    Troubleshooting, I get back the proper node id for $scope.currentNode.id ... but $scope.currentNode.parent.id is "undefined". I'm not sure why.

    Edit: BTW, one of the changes I had to make get this demo to work in Umbraco 7.0.3 was a change to App_Code\PeopleTreeController.cs. This ...

    var node = CreateTreeNode(person.Id.ToString(), queryStrings, person.Name, "icon-user", false);
    

    became this ...

    var node = CreateTreeNode(person.Id.ToString(), id, queryStrings, person.Name, "icon-user", false);
    

    The reason was because CreateTreeNode() was throwing an error that the arguments were incorrect. The second argument has to be a parent node id.

  • David Whiteford 26 posts 79 karma points
    May 14, 2014 @ 13:56
    David Whiteford
    0

    I'm having the same issue - anyone resolve this?

    Thanks for your time

  • David Whiteford 26 posts 79 karma points
    Jun 12, 2014 @ 12:03
    David Whiteford
    1
    $scope.currentNode.parent() fixes this
Please Sign in or register to post replies

Write your reply to:

Draft