Fix #6201 - Category select
[roojs1] / examples / form / combocheck.js
index 8c38ca0..2767519 100644 (file)
@@ -11,6 +11,10 @@ Roo.onReady(function(){
     Roo.QuickTips.init();
 
  
+    var sampleData = 
     /*
      * ================  Form 2  =======================
      */
@@ -23,11 +27,16 @@ Roo.onReady(function(){
                 xtype : 'ComboCheck',
                 xns: Roo.form,
                 
-                name : 'states_list',
                 fieldLabel: 'State',
+                
+                name : 'states_list',
                 hiddenName:'states',
+                
+                
                 valueField : 'abbr',
                 displayField:'state',
+                
+             
                 store: {
                     xns : Roo.data,
                     xtype : 'SimpleStore',
@@ -41,7 +50,13 @@ Roo.onReady(function(){
                 triggerAction: 'all',
                 emptyText:'Select a state...',
                 selectOnFocus:true,
-                width:190
+                width:190,
+                listeners : {
+                    change: function() {
+                        Roo.log("changed to " + this.getValue());
+                        
+                    }
+                }
           }
 
             
@@ -50,5 +65,12 @@ Roo.onReady(function(){
     });
 
     mform.render('form-ct5');
-    combo = mform.findField('states_list');
+    combo = mform.findField('states');
+    mform.setValues({
+        states : '["AK","AZ"]',
+        states_list : "Alaska, Arizona"
+        
+    })
+    
+    
 });
\ No newline at end of file