Try our conversational search powered by Generative AI!

Dojo: Get widget to update


So, doing my first widget in dojo and having some issues.


I have two dropdown lists and I want the choice of the first to update the second. To do this I have registered two Editors, EnumEditor and ElectedEditor both are extensions of the epi.cms.contentediting.editors.SelectionEditor.

In EnumEditor I have added a publication of a topic in the _updateSelection

topic.publish("EnumEditor_updateSelection", value);


Now in my ElectedEditor I'm subscribing to this in the postCreate function

topic.subscribe("EnumEditor_updateSelection", this._updateData());


The updateData function is defined as

_updateData: function ()
            this.options =, function (item) {
                return {
                    label: item.text,
                    value: item.value,
                    selected: (item.value == this.value) || (!item.value && !this.value)
            }, this);

            this.actualValue = this.value;


Running this however gets me a TypeError {} in dojo.js


TypeError {} dojo.js:3718
(anonymous function) dojo.js:3718
dojo.Deferred.reject.errback dojo.js:3718
notify dojo.js:3688
dojo.Deferred.promise.then.then dojo.js:3785
(anonymous function) widgets.js:2
hitch dojo.js:11044
runFactory dojo.js:1043
execModule dojo.js:1169
checkComplete dojo.js:1192
onLoadCallback dojo.js:1352

And now I'm stuck so.. Anyone got something helpful to share on the subject?

Oct 16, 2013 15:52

Hi Petter, have you succeeded with this? I also have a similar requirement and having issues. 

I posted this on the forum but no luck yet

Would you mind sharing you code with me if you have succeeded?

Nov 06, 2013 4:13
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.