diff --git a/CHANGES b/CHANGES index 9d843a3..b061d64 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ + + - Fix update comboBox data + 0.47.9 2023-10-26 10:05:30 +0200 Tobias Oetiker - better fix, based on https://github.com/qooxdoo/qooxdoo/pull/10632 @@ -81,20 +84,11 @@ - these changes are necessary to make callbackery work with qx8 -0.45.0 2023-05-23 12:05:16 +0200 Tobias Oetiker - - - - -0.45.0 2023-05-23 12:05:01 +0200 Tobias Oetiker - - - -======= 0.45.1 2023-05-08 10:52:48 +0200 Tobias Oetiker ->>>>>>> 93b1caf4debb55a06a72ad1d38134bb1f4173bf4 - Reload CardList on action response - -0.45.0 2023-03-30 09:13:03 +0200 Tobias Oetiker + +0.45.0 2023-05-23 12:05:16 +0200 Tobias Oetiker - new widget attribute spellcheck which allows to enable spellcheckers like languagetool in textareas or normal text widets diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/Auto.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/Auto.js index ad97425..e8f18c1 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/Auto.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/Auto.js @@ -357,7 +357,6 @@ qx.Class.define("callbackery.ui.form.Auto", { */ setSelectBoxData : function(box, data) { let model; - if (data.length == 0) { model = qx.data.marshal.Json.createModel([ { title : '', @@ -381,7 +380,9 @@ qx.Class.define("callbackery.ui.form.Auto", { let oldItem = ctrl.getValue(); let newItem = null; if (oldItem){ - newItem = lookup[oldItem.getKey()]; + if (oldItem.getKey) { + newItem = lookup[oldItem.getKey()]; + } if (!newItem){ console.warn(`SelectBox ${box} has no entry for ${oldItem.getKey()} selecting first item.`); } @@ -393,6 +394,21 @@ qx.Class.define("callbackery.ui.form.Auto", { }, + /** + * set the data in a combobox + * + * @param box {var} TODOC + * @param widget {var} TODOC + * @param data {var} TODOC + */ + setComboBoxData : function(box, data) { + let ctrl = this._boxCtrl[box]; + this._settingData++; + ctrl.setModel(qx.data.marshal.Json.createModel(data)); + this._settingData--; + }, + + /** * load new data into a model * if relax is set unknown properties will be ignored diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js index ac69d8c..3766493 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js @@ -254,13 +254,20 @@ qx.Class.define("callbackery.ui.plugin.Form", { if (!s.key){ return; } - if (s.widget == 'selectBox' || s.widget == 'comboBox'){ + if (s.widget == 'selectBox'){ if (s.reloadOnFormReset !== false) { this._reconfSelectBoxRunning++; this._form.setSelectBoxData(s.key,s.cfg.structure); this._reconfSelectBoxRunning--; } } + if (s.widget == 'comboBox'){ + if (s.reloadOnFormReset !== false) { + this._reconfSelectBoxRunning++; + this._form.setComboBoxData(s.key, s.cfg.structure); + this._reconfSelectBoxRunning--; + } + } if (s.set) { if ('value' in s.set){ delete s.set.value; // do NOT change the value of anything.