I have a custom field type in Sitecore 8.
I use the Context.ClientPage.SendMessage
to call the contenteditor:save
command.
This works, but forces the page to reload producing a warning dialogue to pop up.
I actually only want the Save button to be enabled, so just need the page to know the state has changed.
This is my current code:
protected void Run(ClientPipelineArgs args)
{
Assert.ArgumentNotNull((object) args, "args");
if (args.IsPostBack)
{
Context.ClientPage.SendMessage(this, "contenteditor:save");
return;
}
var urlString = new UrlString(args.Parameters["url"]);
Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "700", "510", "", true);
args.WaitForPostBack();
}