commit extjs-2.2.1
[extjs.git] / source / widgets / form / RadioGroup.js
1 /*\r
2  * Ext JS Library 2.2.1\r
3  * Copyright(c) 2006-2009, Ext JS, LLC.\r
4  * licensing@extjs.com\r
5  * \r
6  * http://extjs.com/license\r
7  */\r
8 \r
9 /**\r
10  * @class Ext.form.RadioGroup\r
11  * @extends Ext.form.CheckboxGroup\r
12  * A grouping container for {@link Ext.form.Radio} controls.\r
13  * @constructor\r
14  * Creates a new RadioGroup\r
15  * @param {Object} config Configuration options\r
16  */\r
17 Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {\r
18     /**\r
19      * @cfg {Boolean} allowBlank True to allow every item in the group to be blank (defaults to false). If allowBlank = \r
20      * false and no items are selected at validation time, {@link @blankText} will be used as the error text.\r
21      */\r
22     allowBlank : true,\r
23     /**\r
24      * @cfg {String} blankText Error text to display if the {@link #allowBlank} validation fails (defaults to "You must \r
25      * select one item in this group")\r
26      */\r
27     blankText : "You must select one item in this group",\r
28     \r
29     // private\r
30     defaultType : 'radio',\r
31     \r
32     // private\r
33     groupCls: 'x-form-radio-group'\r
34 });\r
35 \r
36 Ext.reg('radiogroup', Ext.form.RadioGroup);\r