diff --git a/dist/SetAttribute.mpk b/dist/SetAttribute.mpk index 5c1c5d1..979a9e9 100644 Binary files a/dist/SetAttribute.mpk and b/dist/SetAttribute.mpk differ diff --git a/src/SetAttribute/SetAttribute.xml b/src/SetAttribute/SetAttribute.xml index 20692fb..bc6acb2 100644 --- a/src/SetAttribute/SetAttribute.xml +++ b/src/SetAttribute/SetAttribute.xml @@ -49,6 +49,7 @@ + diff --git a/src/SetAttribute/SetAttributeTranslatable.xml b/src/SetAttribute/SetAttributeTranslatable.xml index b2a1f02..48ac61d 100644 --- a/src/SetAttribute/SetAttributeTranslatable.xml +++ b/src/SetAttribute/SetAttributeTranslatable.xml @@ -44,6 +44,7 @@ + diff --git a/src/SetAttribute/widget/SetAttribute.js b/src/SetAttribute/widget/SetAttribute.js index 4b3571c..e5fdb50 100644 --- a/src/SetAttribute/widget/SetAttribute.js +++ b/src/SetAttribute/widget/SetAttribute.js @@ -166,6 +166,21 @@ define([ }); this._handles = [objectHandle]; + + // Add subscriptions for configured attributes + dojoArray.forEach(this.attributes, dojoLang.hitch(this, function (attribute) { + if (attribute.useDynamicValue && attribute.dynamicValue) { + var attrHandle = mx.data.subscribe({ + guid: this._contextObj.getGuid(), + attr: attribute.dynamicValue, + callback: dojoLang.hitch(this, function (guid, attr, attrValue) { + this._updateRendering(); + }) + }); + + this._handles.push(attrHandle); + } + })); } } }); diff --git a/test/widgets/SetAttribute.mpk b/test/widgets/SetAttribute.mpk index 5c1c5d1..979a9e9 100644 Binary files a/test/widgets/SetAttribute.mpk and b/test/widgets/SetAttribute.mpk differ