Roo/form/ComboCheck.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 06:22:00 +0000 (14:22 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 2 Sep 2011 06:22:00 +0000 (14:22 +0800)
Roo/form/ComboCheck.js

index 68345b9..6a7d150 100644 (file)
@@ -129,23 +129,19 @@ Roo.extend(Roo.form.ComboCheck, Roo.form.ComboBox, {
         Roo.log(v);
         this.value = v;
         
-        
-        
-        var text = v;
-        if(this.valueField){
-            var r = this.findRecord(this.valueField, v);
+        var vals = this.getValueArray();
+        Roo.each(vals, function(k) {
+            var r = this.findRecord(this.valueField, k);
             if(r){
                 text = r.data[this.displayField];
             }else if(this.valueNotFoundText !== undefined){
                 text = this.valueNotFoundText;
             }
-        }
-        this.lastSelectionText = text;
-        if(this.hiddenField){
-            this.hiddenField.value = v;
-        }
+        },this);
+        this.hiddenField.value = v;
+        
         Roo.form.ComboBox.superclass.setValue.call(this, text);
         this.value = v;
-    },)
+    ,
     
 });
\ No newline at end of file