1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.form.validator; |
16 |
| |
17 |
| import org.apache.hivemind.util.PropertyUtils; |
18 |
| import org.apache.tapestry.IMarkupWriter; |
19 |
| import org.apache.tapestry.IRequestCycle; |
20 |
| import org.apache.tapestry.form.FormComponentContributorContext; |
21 |
| import org.apache.tapestry.form.IFormComponent; |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| public abstract class BaseValidator implements Validator |
31 |
| { |
32 |
| private String _message; |
33 |
| |
34 |
66
| public String getMessage()
|
35 |
| { |
36 |
66
| return _message;
|
37 |
| } |
38 |
| |
39 |
32
| public void setMessage(String message)
|
40 |
| { |
41 |
32
| _message = message;
|
42 |
| } |
43 |
| |
44 |
38
| public BaseValidator()
|
45 |
| { |
46 |
| } |
47 |
| |
48 |
58
| public BaseValidator(String initializer)
|
49 |
| { |
50 |
58
| PropertyUtils.configureProperties(this, initializer);
|
51 |
| } |
52 |
| |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
0
| public boolean getAcceptsNull()
|
58 |
| { |
59 |
0
| return false;
|
60 |
| } |
61 |
| |
62 |
| |
63 |
| |
64 |
| |
65 |
| |
66 |
4
| public void renderContribution(IMarkupWriter writer, IRequestCycle cycle,
|
67 |
| FormComponentContributorContext context, IFormComponent field) |
68 |
| { |
69 |
| } |
70 |
| |
71 |
| |
72 |
| |
73 |
| |
74 |
| |
75 |
2
| public boolean isRequired()
|
76 |
| { |
77 |
2
| return false;
|
78 |
| } |
79 |
| } |