As counter-part to `onGetValue`, which is for form assembly, add the
`onSetValues` helper that allows to hook into setting the values on
the fields, for example if one needs to transform a `disabled` to
`enable`.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
}
},
+ onSetValues: function(values) {
+ return values;
+ },
+
setValues: function(values) {
let me = this;
let form = me.up('form');
- Ext.iterate(values, function(fieldId, val) {
+ values = me.onSetValues(values);
+
+ Ext.iterate(values, function(fieldId, val) {
let fields = me.query('[isFormField][name=' + fieldId + ']');
for (const field of fields) {
if (field) {