]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * This example shows simple dynamic data binding. When the data in the underlying view\r | |
3 | * model is modified, the change is relayed back to the panel and the markup is updated.\r | |
4 | */\r | |
5 | Ext.define('KitchenSink.view.binding.Dynamic', {\r | |
6 | extend: 'Ext.panel.Panel',\r | |
7 | alias: 'widget.binding-dynamic',\r | |
8 | //<example>\r | |
9 | otherContent: [{\r | |
10 | type: 'Controller',\r | |
11 | path: 'classic/samples/view/binding/DynamicController.js'\r | |
12 | }],\r | |
13 | //</example>\r | |
14 | \r | |
15 | width: 300,\r | |
16 | bodyPadding: 10,\r | |
17 | controller: 'binding-dynamic',\r | |
18 | \r | |
19 | viewModel: {\r | |
20 | data: {\r | |
21 | title: 'Some Title',\r | |
22 | content: 'Some Content'\r | |
23 | }\r | |
24 | },\r | |
25 | \r | |
26 | bind: {\r | |
27 | title: 'Info - {title}',\r | |
28 | html: 'Stuff: {content}'\r | |
29 | },\r | |
30 | \r | |
31 | tbar: [{\r | |
32 | text: 'Change title',\r | |
33 | listeners: {\r | |
34 | click: 'onChangeTitleClick'\r | |
35 | }\r | |
36 | }, {\r | |
37 | text: 'Change content',\r | |
38 | listeners: {\r | |
39 | click: 'onChangeContentClick'\r | |
40 | }\r | |
41 | }]\r | |
42 | });\r |