Copied to clipboard

Flag this post as spam?

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


  • chappers 18 posts 36 karma points
    Oct 13, 2010 @ 13:25
    chappers
    0

    Custom Section - Delete Functionality Few Issues

    Hi Everyone,

    I was hoping someone might be able to offer some wisdom on a couple of issues I'm having with creating a custom section in Umbraco 4.5.

    I’ve created my own section and tree and setup create and delete tasks which all work great however I have a few issues with the way the delete task works.

    The first issue is that if I select the node I want to delete it loads in the frame on the right as expected.  Then when I go ahead and delete it the node removes from the tree but the right hand frame doesn’t refresh.  This is bit confusing for the user plus they can try and interact with the data that is now deleted.

    For my Save() I used:

     _returnUrl = "propertyManager/editSpace.aspx?ID=" + SpaceID + "&Mode=new";

    However the _ returnUrl doesn’t seem to work in a Delete()?  Is this by design?  If so do you have any recommendations on how to change the right frame to another URL to improve the User Experience on delete?

    This old thread seems to have same kind of issue:

    http://our.umbraco.org/forum/developers/extending-umbraco/9759-Custom-Section-Delete-Functionality-in-Tree

    My second issue with the delete() method is it seems to ignore if I return false – i.e. if I return false to simulate a delete error the node still disappears in the tree even though it hasn’t deleted – a quick reload of nodes and its back.  Why is this? Bug?

    This old thread describes same thing:

    http://our.umbraco.org/forum/developers/extending-umbraco/2634-Custom-delete-ITask-bug-

    Any help would be great

     

    Thanks

    Chris

  • Adam Nelson 27 posts 186 karma points c-trib
    Apr 20, 2011 @ 02:22
    Adam Nelson
    0

    I've noticed the same problem, as well as the fact that the bool return value from Delete() in ITask does nothing (you need to throw an exception within Delete() to abort the delete - and your exception message comes up as a nice bubble).

    But this problem still exists - if you delete the node you have active in the right frame, you can't change the URL of the right frame.

    My current workaround will be to detect deletion when the right frame's data is saved again, and give an error along the lines of 'this item has been deleted.'.

    But it would be nice to not have to.

     

Please Sign in or register to post replies

Write your reply to:

Draft