Copied to clipboard

Flag this post as spam?

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


  • Joakim 8 posts 27 karma points
    Oct 06, 2009 @ 12:54
    Joakim
    0

    Reloading / refreshing current node in the GUI from custom datatype

    Hey guys,

    I realise that theres a(/some) similar topic(s) but none of them are in the right section nor provide a working solution, so I figured I'd create a new one.

    I'm trying to reload the content of the current node/page from my custom datatype so that my gui will be updated after save or save&publish. I've been looking for a built-in js-function but haven't been able find anything useful anywhere, thus i ask:

    How would you go about doing this from a custom DataType?

    A previous topic suggested to use Response.Redirect, but doesn't seem to work for me, even if i try to disable caching, alot of my code prior to the call is skipped.

    Thanks a bunch,
    Joakim

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Oct 06, 2009 @ 16:13
    Shannon Deminick
    0

    In all Umbraco version pre 4.1 (which isn't released yet), there's no real public tree API. You would have to look into the crazy codebase of xTree (which is what runs the tree in pre 4.1). It's not pretty and it's buggy so it's not going to be the nicest experience :) It is possible though if you have a lot of perserverence. The GOOD news is that xTree is gone in 4.1 the entire tree structure has been re-written from the ground up using jsTree AND there's actually a .Net Umbraco API that you can call from c# to interact with client code. For instance, in 4.1 you can just do BasePage.Current.ClientTools.SyncTree(....) which will render the correct JavaScript to resync any particular node you want ;)

     

  • Joakim 8 posts 27 karma points
    Oct 07, 2009 @ 13:36
    Joakim
    0

    I ended up doing some things differently and overriding OnLoad, so I'm glad I didn't have the needed perseverance in this case ;D

    That sounds totally sweet though - I'm already looking forward to 4.1!

Please Sign in or register to post replies

Write your reply to:

Draft