Copied to clipboard

Flag this post as spam?

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


  • Delete me 45 posts 66 karma points
    May 26, 2010 @ 09:39
    Delete me
    0

    parent.refreshNode() problems

    Hi all

    I have an aftersave eventhandler, wich is supposed to refresh the nodes under the current parent:

    ((BasePage)doc.HttpContext.CurrentHandler).ClientScript.RegisterClientScriptBlock(GetType(),
     
    Guid.NewGuid().ToString(), "<script>parent.refreshNode();</script>");

    Unfortunately the refresh fires on completely random nodes and parents - if at all. 

    I discovered the javascript variable "nodeKey" returns "web-fx-element-NUM" where NUM is all kind of numbers, but when I use right-click->reload nodes, NUM is always the same when used on the same node.

    Any clue what can be the issue here?

    Thanks in advance!

    Mathias

     

  • Delete me 45 posts 66 karma points
    May 27, 2010 @ 17:46
    Delete me
    0

    Ok - a little progress - I managed to get the refresh to behave by setting the nodeKey variable manually:

    parent.refreshNode(nodeKey='webfx-tree-object-10');

    My problem is now only that I dont know how to get the nodeKey value from C#. All I can find out is that umbraco.cms.presentation.Trees.BaseTree has a reference to nodeKey. But how do i get it from a nodeID?

     

    Thanks,

    Mathias

Please Sign in or register to post replies

Write your reply to:

Draft