]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('KitchenSink.view.binding.ChainedSelect', {\r |
2 | extend: 'Ext.form.Panel',\r | |
3 | \r | |
4 | //<example>\r | |
5 | otherContent: [{\r | |
6 | type: 'ViewModel',\r | |
7 | path: 'modern/src/view/binding/ChainedSelectModel.js'\r | |
8 | }, {\r | |
9 | type: 'Store',\r | |
10 | path: 'modern/src/store/Countries.js'\r | |
11 | }, {\r | |
12 | type: 'Store',\r | |
13 | path: 'modern/src/store/States.js'\r | |
14 | }],\r | |
15 | //</example>\r | |
16 | \r | |
17 | referenceHolder: true,\r | |
18 | \r | |
19 | viewModel: 'binding-chainedselect',\r | |
20 | \r | |
21 | items: {\r | |
22 | xtype: 'fieldset',\r | |
23 | instructions: [\r | |
24 | 'The states store contains all states, however it filters based upon the ',\r | |
25 | 'id of the selected record in the country field.'\r | |
26 | ].join(''),\r | |
27 | items: [{\r | |
28 | xtype: 'selectfield',\r | |
29 | label: 'Country',\r | |
30 | reference: 'countryField',\r | |
31 | valueField: 'id',\r | |
32 | displayField: 'name',\r | |
33 | bind: {\r | |
34 | store: '{countries}'\r | |
35 | }\r | |
36 | }, {\r | |
37 | xtype: 'selectfield',\r | |
38 | label: 'States',\r | |
39 | placeHolder: 'Choose a country',\r | |
40 | valueField: 'id',\r | |
41 | displayField: 'name',\r | |
42 | bind: {\r | |
43 | store: '{states}'\r | |
44 | }\r | |
45 | }]\r | |
46 | }\r | |
47 | }); |