initial import
[roojs1] / examples / form / combos.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11 \r
12 Roo.onReady(function(){
13     // simple array store
14     var store = new Roo.data.SimpleStore({
15         fields: ['abbr', 'state'],
16         data : Roo.exampledata.states // from states.js
17     });
18     var combo = new Roo.form.ComboBox({
19         store: store,
20         displayField:'state',
21         typeAhead: true,
22         mode: 'local',
23         triggerAction: 'all',
24         emptyText:'Select a state...',
25         selectOnFocus:true,
26         resizable:true
27     });
28     combo.applyTo('local-states');
29
30
31
32     var converted = new Roo.form.ComboBox({
33         typeAhead: true,
34         triggerAction: 'all',
35         transform:'state',
36         width:135,
37         forceSelection:true
38     });
39 });