This question has been answered by dvstudiosinc. See the first response.
,updateProduct: function(btn,e) {
if (!this.updateProductWindow) {
this.updateProductWindow = MODx.load({
xtype: 'products-window-product-update'
,record: this.menu.record
,listeners: {
'success': {fn:this.refresh,scope:this}
}
});
}
this.updateProductWindow.reset();
this.updateProductWindow.setValues(this.menu.record);
this.updateProductWindow.show(e.target);
} ,updateProduct: function(btn,e) {
var win = MODx.load({
xtype: 'products-window-product-update'
,record: this.menu.record
,listeners: {
'success': {fn:this.refresh,scope:this}
}
});
win.setValues(this.menu.record);
win.show(e.target);
},fields: ['id',..., {name: 'audience_asphalt', type: 'bool'}, {name: 'audience_engineers', type: 'bool'}, 'audience_maintenance', 'audience_contracting']
The new way of update function, fixed my bug with checbox aswell. Thanks alot