3 * (C) Alan Knowles 2011
4 * Licence : Roojs - LGPL
9 Roo.onReady(function(){
31 ['DC', 'District of Columbia']
44 ['E', 'Empty states', []],
47 * ================ Form 2 =======================
55 xtype : 'ComboNested',
70 xtype : 'SimpleStore',
71 fields: ['abbr', 'state' , 'cn'],
72 data : sampledata// from states.js
79 emptyText:'Select a state...',
84 Roo.log("changed to " + this.getValue());
91 xtype : 'ComboNested',
94 displayField : 'name',
96 emptyText : 'Category',
97 fieldLabel : 'Category',
98 forceSelection : true,
99 hiddenName : 'supplier_category_id',
103 loadingText : 'Searching',
105 name : 'supplier_category_id_name',
108 queryParam : 'query[fullpath]',
109 selectOnFocus : true,
110 triggerAction : 'all',
115 select : function (combo, record, index)
117 // _this.grid.footer.onClick('first');
125 sortInfo : { direction : 'ASC', field: 'fullpath' },
127 beforeload : function (_self, o){
128 o.params = o.params || {};
129 o.params._as_tree = 1;
138 url : '/web.Texon/admin.php/Roo/category.php',
143 xtype : 'JsonReader',
144 fields : [{"name":"id","type":"int"},{"name":"fullpath","type":"string"},'name', 'cn' ],
147 totalProperty : 'total',
160 mform.render('form-ct5');
161 combo = mform.findField('states');
162 cats = mform.findField('supplier_category_id');
164 states : '["AK","AZ"]',
165 states_list : "Alaska, Arizona"