diff --git a/package.json b/package.json index e086c47..e83fb59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "LabelSelect", - "version": "4.4.0", + "version": "4.4.1", "description": "With this widget you can easily create/assign/remove objects (for example labels) to/from an object.", "license": "", "author": "", diff --git a/src/LabelSelect/widget/LabelSelect.js b/src/LabelSelect/widget/LabelSelect.js index 704fc76..dcd4367 100644 --- a/src/LabelSelect/widget/LabelSelect.js +++ b/src/LabelSelect/widget/LabelSelect.js @@ -191,10 +191,8 @@ define([ params: { applyto: "selection", actionname: mf, - guids: [obj.getGuid()] - }, - store: { - caller: this.mxform + guids: [obj.getGuid()], + origin: this.mxform }, callback: function() { if (cb && typeof cb === "function") { @@ -272,7 +270,8 @@ define([ _saveObject: function() { logger.debug(this.id + "._saveObject"); - mx.data.save({ + var method = (!mx.version || mx.version && parseInt(mx.version.split(".")[0]) < 7) ? "save" : "commit"; + mx.data[method]({ mxobj: this._contextObj, callback: lang.hitch(this, function() { this._execMf(this._contextObj, this.onchangemf); diff --git a/src/package.xml b/src/package.xml index dca0f65..9d5a518 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/test/widgets/LabelSelect.mpk b/test/widgets/LabelSelect.mpk index 27a56c1..d0c8f4b 100644 Binary files a/test/widgets/LabelSelect.mpk and b/test/widgets/LabelSelect.mpk differ