Pman.Dialog.CoreMailingListMessage.bjs
authorEdward <edward@roojs.com>
Thu, 20 Feb 2014 07:05:16 +0000 (15:05 +0800)
committerEdward <edward@roojs.com>
Thu, 20 Feb 2014 07:05:16 +0000 (15:05 +0800)
Pman.Dialog.CoreMailingListMessage.js

Pman.Dialog.CoreMailingListMessage.bjs
Pman.Dialog.CoreMailingListMessage.js

index 4f394b7..7a29081 100644 (file)
                                 },
                                 {
                                     "listeners": {
-                                        "select": "function (combo, record, index)\n{\n    Roo.log(record);\n/*\n    (function() { \n        combo.setValue('');\n    }).defer(100);\n*/    \n    _this.form.findField('bodytext').setValue(record.data.content);\n\n}"
+                                        "select": "function (combo, record, index)\n{\n    Roo.log(record);\n/*\n    (function() { \n        combo.setValue('');\n    }).defer(100);\n*/    \n    if(!record){\n        return;\n    }\n    _this.form.findField('bodytext').setValue(record.data.content);\n\n}"
                                     },
                                     "allowBlank": true,
                                     "alwaysQuery": true,
index 7da1a7c..529c94b 100644 (file)
@@ -173,6 +173,9 @@ Pman.Dialog.CoreMailingListMessage = {
                                             combo.setValue('');
                                         }).defer(100);
                                     */    
+                                        if(!record){
+                                            return;
+                                        }
                                         _this.form.findField('bodytext').setValue(record.data.content);
                                     
                                     }