Wiki source code of WOCheckBox
Last modified by Filippo Laurìa on 2013/09/08 12:44
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
5.1 | 1 | |
2 | |||
![]() |
4.1 | 3 | {{toc/}} |
![]() |
1.1 | 4 | |
5 | = Introduction = | ||
6 | |||
![]() |
3.1 | 7 | A WOCheckBox object displays itself in the HTML page as its namesake, a check box user interface control. It corresponds to the HTML element <INPUT TYPE="CHECKBOX"...>. |
8 | |||
9 | If you want to create a list of check boxes, use the WXCheckBoxList dynamic element in the WebObjects examples. | ||
10 | |||
![]() |
1.1 | 11 | = Usage = |
12 | |||
13 | {{code}} | ||
![]() |
3.1 | 14 | WOCheckBox { |
15 | value=defaultValue; | ||
16 | [selection=selectedValue;] | ||
17 | [name=fieldName;] | ||
18 | [disabled=aBoolean;] ... | ||
19 | } | ||
![]() |
1.1 | 20 | |
![]() |
3.1 | 21 | WOCheckBox { |
22 | checked=aBoolean; | ||
23 | [name=fieldName;] | ||
24 | [disabled=aBoolean;] ... | ||
25 | } | ||
26 | |||
![]() |
1.1 | 27 | {{/code}} |
28 | |||
29 | = Bindings = | ||
30 | |||
![]() |
4.1 | 31 | |((( |
32 | value | ||
33 | )))|((( | ||
34 | Value of this input element. If not specified, WebObjects provides a default value. | ||
35 | ))) | ||
36 | |((( | ||
37 | selection | ||
38 | )))|((( | ||
39 | If selection and value are equal when the page is generated, the check box is checked. When the page is submitted, selection is assigned the value of the check box. | ||
40 | ))) | ||
41 | |((( | ||
42 | checked | ||
43 | )))|((( | ||
44 | During page generation, if checked evaluates to true, the check box appears in the checked state. During request handling, checked reflects the state the user left the check box in: true if checked; false if not. | ||
45 | ))) | ||
46 | |((( | ||
47 | name | ||
48 | )))|((( | ||
49 | Name that uniquely identifies this element within the form. You may specify a name or let WebObjects automatically assign one at runtime. | ||
50 | ))) | ||
51 | |((( | ||
52 | disabled | ||
53 | )))|((( | ||
54 | If disabled evaluates to true, this element appears in the page but is not active. That is, selection won't contain the user's selection when the page is submitted. | ||
55 | ))) | ||
![]() |
3.1 | 56 | |
![]() |
1.1 | 57 | = Examples = |
58 | |||
59 | == Java methods == | ||
60 | |||
61 | == WOD-style == | ||
62 | |||
![]() |
5.1 | 63 | {{code}} |
64 | |||
65 | {{/code}} | ||
![]() |
1.1 | 66 | |
67 | == Inline bindings (WOOGNL) == | ||
68 | |||
![]() |
5.1 | 69 | {{code}} |
70 | <wo:checkbox name="MyCheck" checked = "~true" /> | ||
71 | {{/code}} | ||
![]() |
1.1 | 72 | |
73 | = Related documents = |