SaaS CMS has officially launched! Learn more now.

Javascript call when a property is changed


I want to make a specific javascript call when an image property has changed in the on-page-edit.

Is there any way to hook up EPiServer javascript events when a property has changed, a property of specific typ has changed, any property has changed?


Nov 28, 2013 10:13

Hi Erik,

No offical way to do this but: yes, you can hook on JsonRest's patch method like this:


this.contentDataStore = this.contentDataStore || dependency.resolve("epi.storeregistry").get("epi.cms.contentdata");
            aspect.after(this.contentDataStore, "patch", lang.hitch(this, function (object, options) {
                // TODO: Raise event or do whatever you want
            }), true);


Hope that help!

Ha Bui

Edited, Nov 29, 2013 7:06

Thanks a this.

Can you also give me an example of where to put this code. I cannot find any info of how to load it, just examples of custom asset components. But this is not that kind of component...

I must get hold of the dependecy object with dojo I think.

Dec 02, 2013 11:29

Hi Erik,

You can put it in initialize method of your addons module. (in case you create new module)

You can put it in postCreate method of your custom property editor. (in case you create new property editor)



/Ha Bui

P.S You can contact with me via email ( and we can discuss more)


Dec 02, 2013 12:01
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.