Copied to clipboard

Flag this post as spam?

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


  • Peter Cort Larsen 421 posts 1038 karma points
    Oct 03, 2012 @ 10:07
    Peter Cort Larsen
    0

    Multi-node tree picker: Saving clears selected items

    Hi,

    I have a problem using Multi-node tree picker.

    When selecting some nodes and saving the page, the selected items disappears until i re-enter the page again.

     

    Can this be avoided?

     

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 03, 2012 @ 10:43
    Lee Kelleher
    0

    Hi Peter,

    Which version of Umbraco and uComponents are you using?

    This is the second time I've heard about this issue - see here - I haven't been able to reproduce the issue (yet). So any additional details would be great.

    Cheers, Lee.

  • Peter Cort Larsen 421 posts 1038 karma points
    Oct 03, 2012 @ 11:30
    Peter Cort Larsen
    0

    Hi,.

     

    I use vers. 3.03 on a umb vers. 4.7.1.1

  • Peter Cort Larsen 421 posts 1038 karma points
    Nov 13, 2012 @ 10:26
    Peter Cort Larsen
    0

    Still a problem, i vanet got any more info, no js errors. it just dosnt retain the state of the selected nodes.

  • Peter Cort Larsen 421 posts 1038 karma points
    Nov 14, 2012 @ 13:43
    Peter Cort Larsen
    0

    Hi all,

    I ended up doing this, see code below.

    It reloads the node after first save, to get selected nodes from multi node tree picker.

    The user have to life with, that the nodes loads twice.

        // code by Tim Geyssens
    public class DocumentNew : ApplicationBase
    {

    //Save pnode twice to load selected content of multi node tree picker.
    public DocumentNew()
    {
    Document.AfterSave += new Document.SaveEventHandler(Document_Save);
    }

    void Document_Save(Document sender, umbraco.cms.businesslogic.SaveEventArgs e)
    {
    umbraco.BasePages.BasePage.Current.ClientTools.ChangeContentFrameUrl(string.Concat("editContent.aspx?id=", sender.Id));
    }
    }
  • Peter Cort Larsen 421 posts 1038 karma points
    Nov 14, 2012 @ 14:01
    Peter Cort Larsen
    0

    Hi,

     

    I forgot to check if the page is valid. If you use mandatoory fields you need this version. Also you can filter out docs, which shouldnt be reloaded.

    using umbraco.BusinessLogic;
    using umbraco.cms.businesslogic.web;

    namespace Ontranet
    {
    // code by Tim Geyssens
    public class DocumentSave : ApplicationBase
    {

    //Save pnode twice to load selected content of multi node tree picker.
    public DocumentSave()
    {
    Document.AfterSave += new Document.SaveEventHandler(Document_Save);
    }

    void Document_Save(Document sender, umbraco.cms.businesslogic.SaveEventArgs e)
    {
    if (sender.ContentType.Alias != "CategoryPage" || sender.ContentType.Alias != "OverviewPage" ||sender.ContentType.Alias != "Master" ||sender.ContentType.Alias != "Widgets" ||sender.ContentType.Alias != "Widget" ||sender.ContentType.Alias != "Folder")
    {
    if (umbraco.BasePages.BasePage.Current.IsValid)
    {
    umbraco.BasePages.BasePage.Current.ClientTools.ChangeContentFrameUrl(string.Concat("editContent.aspx?id=", sender.Id));
    }
    }
    }
    }
    }
Please Sign in or register to post replies

Write your reply to:

Draft