Wiki source code of WORadioButton
Last modified by Pascal Robert on 2011/09/26 05:47
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{toc/}} | ||
2 | |||
3 | = Introduction = | ||
4 | |||
5 | WORadioButton represents itself as an on-off switch. Radio buttons are normally grouped, since the most important aspect of their behavior is that they allow the user to select no more than one of several choices. If the user selects one button, the previously selected button (if any) becomes deselected. | ||
6 | |||
7 | Since radio buttons normally appear as a group, WORadioButton is commonly found within a WORepetition. Alternatively, you can use the WORadioButtonList element. | ||
8 | |||
9 | = Usage = | ||
10 | |||
11 | {{code}} | ||
12 | |||
13 | WORadioButton { | ||
14 | value=defaultValue; | ||
15 | [selection=selectedValue;] | ||
16 | [name=fieldName;] | ||
17 | [disabled=aBoolean;] ... | ||
18 | } | ||
19 | |||
20 | WORadioButton { | ||
21 | checked=aBoolean; | ||
22 | [name=fieldName;] | ||
23 | [disabled=aBoolean;] ... | ||
24 | } | ||
25 | |||
26 | {{/code}} | ||
27 | |||
28 | = Bindings = | ||
29 | |||
30 | {{info}} | ||
31 | In a WORadioButton declaration you must supply either checked or value, but not both:they are mutually exclusive. | ||
32 | {{/info}} | ||
33 | |||
34 | |((( | ||
35 | value | ||
36 | )))|((( | ||
37 | Value of this input element. If not specified, WebObjects provides a default value. | ||
38 | ))) | ||
39 | |((( | ||
40 | selection | ||
41 | )))|((( | ||
42 | If selection and value are equal when the page is generated, the radio button is selected. When the page is submitted, selection is assigned the value of the radio button. | ||
43 | ))) | ||
44 | |((( | ||
45 | checked | ||
46 | )))|((( | ||
47 | During page generation, if checked evaluates to true, the radio button appears in the selected state. During request handling, checked reflects the state the user left the radio button in: true if checked; false if not. | ||
48 | ))) | ||
49 | |((( | ||
50 | name | ||
51 | )))|((( | ||
52 | Name that identifies the radio button's group. Only one radio button at a time can be selected within a group. | ||
53 | ))) | ||
54 | |((( | ||
55 | disabled | ||
56 | )))|((( | ||
57 | If disabled evaluates to true , this element appears in the page but is not active. That is, selection does not contain the user's selection when the page is submitted. | ||
58 | ))) | ||
59 | |||
60 | = Examples = | ||
61 | |||
62 | == Java methods == | ||
63 | |||
64 | == WOD-style == | ||
65 | |||
66 | {{code/}} | ||
67 | |||
68 | == Inline bindings (WOOGNL) == | ||
69 | |||
70 | {{code/}} | ||
71 | |||
72 | = Related documents = |