Roo/form/ComboBoxArray.js
authorAlan Knowles <alan@roojs.com>
Wed, 2 May 2012 05:00:57 +0000 (13:00 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 2 May 2012 05:00:57 +0000 (13:00 +0800)
Roo/form/ComboBoxArray.js

index 9e34a8f..94b5acb 100644 (file)
  * pick multiple items from a combo box, and shows each one.
  *
  *  Fred [x]  Brian [x]  [Pick another |v]
- * 
+ *
+ *
+ *  For this to work: it needs various extra information
+ *    - normal combo problay has
+ *      name, hiddenName
+ *    + displayField, valueField
+ *
+ *    For our purpose...
+ *
+ *
+ *   If we change from 'extends' to wrapping...
+ *   
+ *  
+ *
  * @constructor
  * Create a new ComboBoxArray.
  * @param {Object} config Configuration options
@@ -23,7 +38,13 @@ Roo.form.ComboBoxArray = function(config)
 {
     
     Roo.form.ComboBoxArray.superclass.constructor.call(this, config);
+    
     this.items = new Roo.util.MixedCollection(false);
+    
+    // construct the child combo...
+    
+    
+    
     this.on('select', function(cb, rec, ix) {
         this.addItem(rec.data);
         this.setValue('');
@@ -33,20 +54,21 @@ Roo.form.ComboBoxArray = function(config)
         
     });
     
-    if (!this.hiddenListName && this.hiddenName) {
-        this.hiddenListName = this.hiddenName + '-list';
-    }
-    
+   
     
 }
  
-Roo.extend(Roo.form.ComboBoxArray, Roo.form.ComboBox,
+Roo.extend(Roo.form.ComboBoxArray, Roo.form.Field
 { 
+    /**
+     * @cfg {Roo.form.Combo} combo The combo box that is wrapped
+     */
+    
     lastData : false,
     items  : false,
     
     
-   /**
+    /**
      * @cfg {String} nameField The field to take the 'descriptive' display name from
      */
     nameField : 'name',