-
Notifications
You must be signed in to change notification settings - Fork 0
/
Container.html
79 lines (78 loc) · 3.31 KB
/
Container.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<link href="http://cdn.sencha.com/ext/gpl/4.2.0/resources/css/ext-all.css" rel="stylesheet"/>
<script src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all.js"></script>
<script src="container/ContainerOverride.js"></script>
<script type="application/javascript">
Ext.onReady(function () {
var panel = Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
items: [
{
xtype: 'form',
items: [
{
xtype: 'textfield',
name: 'Name',
fieldLabel: 'Name'
},
{
xtype: 'textfield',
name: 'Value2',
fieldLabel: 'Name'
},
{
xtype: 'fieldcontainer',
fieldLabel: 'Field container',
preventItemsBubble: false,
layout: 'hbox',
width: 600,
items: [
{
xtype: 'textfield',
hideLabel: true,
name: 'Value1',
flex: 1
},
{
xtype: 'textfield',
hideLabel: true,
name: 'Value2',
flex: 1
},
{
xtype: 'textfield',
hideLabel: true,
name: 'Value2',
flex: 1
}
]
},
{
xtype: 'button',
text: 'Display items\'s count',
handler: function () {
var form = panel.down('form');
console.log('form.items.getCount():' + form.items.getCount());
var fieldContainer = form.down('[xtype=fieldcontainer]');
console.log('fieldContainer.items.getCount():' + fieldContainer.items.getCount());
var count = 0;
for (var index in form.allItems) {
count++;
}
console.log('form.allItems count:' + count);
}
}
]
}
]
});
});
</script>
</head>
<body>
</body>
</html>