0

I have been trying to display a message inside a StandardValidator but when I use SheerResponse.Confirm i receive a null object exception in Sitecore 8. What should I use instead?

private ValidatorResult IsValid(Item item)
{
  //ClientPage in null
  Context.ClientPage.ClientResponse.Alert(String.Format(Sitecore.Globalization.Translate.Text(DictionaryKeys.EventCardCollectionNotSavedErrorMessage)));

  //throws null object exception
  SheerResponse.Confirm

  return ValidatorResult.Valid;
}

Thanks,

Charlie

2
  • 1
    Charlie, can you provide a bit more info into how you're trying to display the message? Potentially, if you can, sanitize and provide us a code snippet showing us some context around SheerResponse? Oct 7 '16 at 14:04
  • Hi, basically when i use the code snippet above i receive a null object exception in Sitecore 8.1 Oct 10 '16 at 8:01
3

Please have a look at my answer to this question: How do I display an error dialog from content editor command?

As far as I remember in Sitecore 8 support for Sheer has been droped in favour of Speak.

1
  • But i am trying to display a popup in a implementation of StandardValidator?. Does this mean i cannot do it in c# anymore? Oct 8 '16 at 9:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.