Wiki source code of WOTextField

Last modified by Ray Kiddy on 2021/05/03 20:17

Hide last authors
Ray Kiddy 22.1 1
2
Pascal Robert 20.1 3 {{toc/}}
Pascal Robert 6.1 4
5 = Introduction =
6
Ramsey Gurley 18.1 7 A WOTextField represents itself as a text input field. It corresponds to the HTML element <INPUT TYPE="TEXT"...>.
8
Pascal Robert 6.1 9 = Usage =
10
11 {{code}}
12
Ramsey Gurley 18.1 13 WOTextField {
14 value=aValue;
15 [formatter=formatterObj;]
16 [dateformat=dateFormatString;]
17 [numberformat=numberFormatString;]
18 [name=fieldName;]
19 [disabled=aBoolean;]
20 [useDecimalNumber=aBoolean;]
Ray Kiddy 22.1 21 [size=aNumber;]
Ramsey Gurley 18.1 22 ...
23 }
Pascal Robert 6.1 24
25 {{/code}}
26
27 = Bindings =
28
Pascal Robert 20.1 29 |(((
30 value
31 )))|(((
32 During page generation, value sets the default value displayed in the single-line text field. During request handling, it holds the value the user entered into the field, or the default value if the user left the field untouched.
33 )))
34 |(((
35 formatter
36 )))|(((
37 An instance of a java.text.Format subclass to be used to format object values for display as strings, and format user-entered strings back into object values. This attribute should specify a variable containing (or method returning) a preconfigured formatter object.
38 \\If a user enters an "unformattable" value, WOTextField passes the invalid value through, allowing you to send back an error page that shows the invalid value. |
39 )))
40 |(((
41 dateformat
42 )))|(((
43 A format string that specifies how value should be formatted as a date. If a date format is used, value can be assigned an NSTimestamp object (if it is assigned a java.langString object, it will be stored as the string representation of an NSTimestamp object). If the element's value can't be interpreted according to the format you specify, it is set to null. See the NSTimestamp class specification for a description of the date format syntax.
44 )))
45 |(((
46 numberformat
47 )))|(((
48 A format string that specifies how value should be formatted as a number. If the element's value can't be interpreted according to the format you specify, value is set to null. See the NSNumberFormatter class specification for a description of the number format syntax.
49 )))
50 |(((
51 name
52 )))|(((
53 Name that uniquely identifies this element within the form. You may specify a name or let WebObjects automatically assign one at runtime.
54 )))
55 |(((
56 disabled
57 )))|(((
58 If disabled evaluates to true, the element appears in the page but is not active. That is, value does not contain the user's input when the page is submitted.
59 )))
60 |(((
61 useDecimalNumber
62 )))|(((
63 If useDecimalNumber evaluates to true and numberformat or formatter is not null, the element creates a BigDecimal value from the formatted string value.
64 )))
Ray Kiddy 22.1 65 |(% colspan="1" %)(% colspan="1" %)
66 (((
67 size
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 Sets the size of the text field based on some calculated width of a character. Sets the visual size, not the size of the string allowed in the field.
71 )))
Ramsey Gurley 18.1 72
Pascal Robert 6.1 73 = Examples =
74
75 == Java methods ==
76
77 == WOD-style ==
78
Pascal Robert 20.1 79 {{code/}}
Pascal Robert 6.1 80
81 == Inline bindings (WOOGNL) ==
82
Pascal Robert 20.1 83 {{code/}}
Pascal Robert 6.1 84
85 = Related documents =
Ramsey Gurley 18.1 86
Pascal Robert 20.1 87 [[ERXWOTextField>>url:http://wocommunity.org/documents/javadoc/wonder/latest/er/extensions/components/_private/ERXWOTextField.html||shape="rect"]]