Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / CheckboxManager.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   <title>The source code</title>
6   <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8   <style type="text/css">
9     .highlight { display: block; background-color: #ddd; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-form-CheckboxManager'>/**
19 </span> * @private
20  * Private utility class for managing all {@link Ext.form.field.Checkbox} fields grouped by name.
21  */
22 Ext.define('Ext.form.CheckboxManager', {
23     extend: 'Ext.util.MixedCollection',
24     singleton: true,
25
26     getByName: function(name) {
27         return this.filterBy(function(item) {
28             return item.name == name;
29         });
30     },
31
32     getWithValue: function(name, value) {
33         return this.filterBy(function(item) {
34             return item.name == name &amp;&amp; item.inputValue == value;
35         });
36     },
37
38     getChecked: function(name) {
39         return this.filterBy(function(item) {
40             return item.name == name &amp;&amp; item.checked;
41         });
42     }
43 });
44 </pre>
45 </body>
46 </html>