]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * This example shows how to use basic data binding. The panel title, the content and the\r | |
3 | * button text are all pulled from the view model.\r | |
4 | */\r | |
5 | Ext.define('KitchenSink.view.binding.HelloWorld', {\r | |
6 | extend: 'Ext.panel.Panel',\r | |
7 | alias: 'widget.binding-hello-world',\r | |
8 | width: 500,\r | |
9 | bodyPadding: 10,\r | |
10 | \r | |
11 | viewModel: {\r | |
12 | data: {\r | |
13 | title: 'Hello World',\r | |
14 | html: 'The html content',\r | |
15 | buttonText: 'A button'\r | |
16 | }\r | |
17 | },\r | |
18 | \r | |
19 | bind: {\r | |
20 | title: '{title}',\r | |
21 | html: '{html}'\r | |
22 | },\r | |
23 | \r | |
24 | tbar: [{\r | |
25 | bind: '{buttonText}'\r | |
26 | }]\r | |
27 | });\r |