Hello,
I need to display select-records dialog of Test, after saving another entity's record.
I added a code in edit.js
setup: function () {
alert("setup");
Dep.prototype.setup.call(this);
this.listenTo(this.model, 'after:save', function () {
if (this.model.id) {
this.actionSelectProduct();
}
}, this);
}
actionSelectProduct: function () {
alert("select product");
var scope;
this.notify('Loading...');
scope = 'SupplierFees';
this.createView('dialog', 'Modals.SelectRecords', {
scope: scope,
createButton: true,
multiple: true
}, function (view) {
view.render();
}.bind(this));
},
First time it works. Dialog is opened after save.
After that it is not working for any other record. Dialog just comes and then disappears.
Please help.
Thanks.
I need to display select-records dialog of Test, after saving another entity's record.
I added a code in edit.js
setup: function () {
alert("setup");
Dep.prototype.setup.call(this);
this.listenTo(this.model, 'after:save', function () {
if (this.model.id) {
this.actionSelectProduct();
}
}, this);
}
actionSelectProduct: function () {
alert("select product");
var scope;
this.notify('Loading...');
scope = 'SupplierFees';
this.createView('dialog', 'Modals.SelectRecords', {
scope: scope,
createButton: true,
multiple: true
}, function (view) {
view.render();
}.bind(this));
},
First time it works. Dialog is opened after save.
After that it is not working for any other record. Dialog just comes and then disappears.
Please help.
Thanks.
Comment