Forms & Dialogs
The next generation
Old Style
- Big
- Not easy to develop with
- Non-standard
Old Style
postCreate: function() {
aspect.before(this, '_setValues', this.__setValues.bind(this));
...
/**
* Runs before _setValues using aspect.before, set up in postCreate
*/
__setValues: function(values) {
this._removeAddedElements();
if (values !== undefined) {
values = this.parseDefinitionValues(values);
if ('seed_provider' in values) {
var seeds;
try {
seeds = values.seed_provider[0].parameters[0].seeds;
} catch (e) {}
values.seeds = seeds;
delete values.seed_provider;
}
}
return [values];
}
Old Style
postCreate: function() {
aspect.before(this, '_setValues', this.__setValues.bind(this));
...
/**
* Runs before _setValues using aspect.before, set up in postCreate
*/
__setValues: function(values) {
this._removeAddedElements();
if (values !== undefined) {
values = this.parseDefinitionValues(values);
if ('seed_provider' in values) {
var seeds;
try {
seeds = values.seed_provider[0].parameters[0].seeds;
} catch (e) {}
values.seeds = seeds;
delete values.seed_provider;
}
}
return [values];
}
Copy of New Forms & Dialogs
By Mike McElroy
Copy of New Forms & Dialogs
- 1,014