Try our conversational search powered by Generative AI!

Display warning message in edit mode

Vote:
 

Hello,

 

How can  display a wrning message on some PageData?

I had found this:

protected void Application_Start(object sender, EventArgs e)
{
...
EditPanel.LoadedPage += EditPanel_LoadedPage;
}

void EditPanel_LoadedPage(EditPanel sender, LoadedPageEventArgs e)
{
if (e.Page != null && (e.Page is DatasheetSAPReportTypeItem || e.Page is DatasheetSAPGenerationVariantItem))
sender.Validators.Add(new StaticValidator("Publishing this page will reindex all the products in background you can contnue your work during this time."));
}

 

But my event is never triggered

 

REgards,

 

Benjamin

#80609
Jan 28, 2014 6:26
Vote:
 

Sounds that the validation attribute functionality is what you are looking for.

Check this out: http://www.david-tec.com/2012/06/EPiServer-7-Preview---IValidator-interface/

#80610
Jan 28, 2014 6:46
Vote:
 

Yes it will do the trick thanks a lot!

#80630
Jan 28, 2014 10:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.