Value handling in custom property editor

Vote:
 

I'm working on creating a property editor widget in Episerver CMS 10 that allows a user to select a file from our DAM system, and then store that in a Url property on a ContentBlock. I have based it on a combination of https://tedgustaf.com/blog/2016/custom-editor-for-string-list-properties-in-episerver/ and http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/7/Editing/How-To/Creating-an-Editor-Widget/ and it can select a file (via a selector hosted in the DAM system), feed back the URL via window.postMessage to the widget, then display the new value. However, despite calling 

this._set("value", url);
this.onChange(this.value);

the CMS isn't recognising that the value has changed nor is it allowing it to be saved. The full JS (note: it's work in progress!) is at https://pastebin.com/cts7tYC4 and the widget template is at https://pastebin.com/yYi1DX8f

The value passed to onChange is either a string or null. The backing property is of type EPiServer.Url.

What do I need to modify to make the CMS recognise the change in value?

EDIT: Interestingly, it seems to take notice sometimes if a null value is passed to onChange

#179218
Edited, Jun 05, 2017 16:04
Vote:
 

I have 'resolved' the issue by completely rebuilding the dojo/dijit part based on extending _SelectorBase, using elements of https://tedgustaf.com/blog/2016/display-thumbnail-for-image-properties-in-episerver/ as a template.

#179341
Jun 08, 2017 14:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.