Copied to clipboard

Flag this post as spam?

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


  • Bogdan 250 posts 427 karma points
    Nov 19, 2013 @ 10:17
    Bogdan
    0

    How to cancel ContentService.Creating and show a SpeechBubble

    Hi,

    I'm trying to cancel creating a node and show a message in the speech bubble. This is what I tried:

    private void ContentService_Creating(IContentService sender, NewEventArgs<IContent> e)
            {
                if (e.Entity.ContentType.Name == "Language" && sender.GetContentOfContentType(e.Entity.ContentType.Id).Where(c => c.Name == e.Entity.Name).Any())
                {
                    ClientTools ct = new ClientTools(umbraco.BasePages.BasePage.Current);
                    ct.ShowSpeechBubble(Umbraco.Web.UI.SpeechBubbleIcon.Error, "Language exists", "Creating canceled");
                    e.Cancel = true;
                    return;
                }
            }
    

    but the speech bubble just shows up twice, with the default message "Document Creation / Document creation was canceled".

  • Bogdan 250 posts 427 karma points
    Nov 21, 2013 @ 15:24
    Bogdan
    0

    Please, anyone? It's important to be able to show the user why the event was canceled.

  • Bogdan 250 posts 427 karma points
    Nov 25, 2013 @ 11:24
    Bogdan
    0

    Any help on this would be appreciated. I'm sure this is possible, I just cannot find how to do it.

    Thanks!

  • Thomas Beckert 193 posts 469 karma points
    Jul 10, 2014 @ 13:35
    Thomas Beckert
    0

    Hi Bogdan,

    I also need a solution for this.
    Did you solve you problem or is it still unsolved?

     

    Best regards -

     

    Tom 

  • Bogdan 250 posts 427 karma points
    Jul 10, 2014 @ 15:58
    Bogdan
    0

    Thomas,

    I didn't find a solution, I'm sorry. But in my case canceling the creation of a document was happening in only two situations, making it easy to explain what to look for when the canceling speech bubble showed up with the default message.

  • Keyur Shah 14 posts 44 karma points
    Oct 09, 2014 @ 12:47
    Keyur Shah
    0

    I am also looking solution to this.

    I want to display custome speech bubble message

    Any help would be appreciated.

    Thanks,

     

Please Sign in or register to post replies

Write your reply to:

Draft