- {
- xtype: 'Form',
- xns: Roo.form,
- listeners : {
- actionfailed : function(f, act) {
- _this.dialog.el.unmask();
- // error msg???
- Pman.standardActionFailed(f,act);
-
- },
- actioncomplete : function(f, act) {
- _this.dialog.el.unmask();
- //console.log('load completed');
- // error messages?????
- if(act.type == 'setdata'){
- this.load({ method: 'GET', params: { '_id' : _this.data.id }});
- return;
- }
-
- if (act.type == 'load') {
- _this.data = act.result.data;
- var meth = _this.data.comptype == 'OWNER' ? 'disable' : 'enable';
-
-
- if (_this.form.findField('comptype')) {
- _this.form.findField('comptype')[meth]();
- }
-
- // _this.loaded();
- return;
- }
-
-
- if (act.type == 'submit') { // only submitted here if we are
- _this.dialog.hide();
-
- if (_this.callback) {
- _this.callback.call(this, act.result.data);
- }
- return;
- }
- // unmask??
- },
- rendered : function (form)
- {
- _this.form = form;
- }
- },