1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
package net.sf.beanform; |
16 |
|
|
17 |
|
import net.sf.beanform.prop.BeanProperty; |
18 |
|
|
19 |
|
import org.apache.hivemind.impl.MessageFormatter; |
20 |
|
import org.apache.tapestry.IComponent; |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
1 |
class BeanFormMessages { |
28 |
|
|
29 |
1 |
private final static MessageFormatter FORMATTER = new MessageFormatter( BeanFormMessages.class, "BeanFormMessages" ); |
30 |
|
|
31 |
|
static String nullBean() { |
32 |
2 |
return FORMATTER.getMessage( "null-bean" ); |
33 |
|
} |
34 |
|
|
35 |
|
static String pseudoPropMissingField( BeanProperty property, String fieldName, String blockName ) { |
36 |
2 |
return FORMATTER.format( "pseudo-prop-missing-field", property.getName(), fieldName, blockName ); |
37 |
|
} |
38 |
|
|
39 |
|
static String unmodifiableExplicitProperty( BeanProperty property ) { |
40 |
2 |
return FORMATTER.format( "unmodifiable-explicit-property", property.getName() ); |
41 |
|
} |
42 |
|
|
43 |
|
static String cantFindFieldForProperty( BeanProperty property ) { |
44 |
2 |
return FORMATTER.format( "cant-find-field-for-property", property.getName() ); |
45 |
|
} |
46 |
|
|
47 |
|
static String componentUnexpectedType( IComponent component, Class expectedType ) { |
48 |
3 |
return FORMATTER.format( "component-unexpected-type", component.getId(), expectedType.getName() ); |
49 |
|
} |
50 |
|
|
51 |
|
static String noBeanForm( IComponent component ) { |
52 |
1 |
return FORMATTER.format( "no-bean-form", component.getId() ); |
53 |
|
} |
54 |
|
|
55 |
|
static String noBeanFormRows( IComponent component ) { |
56 |
1 |
return FORMATTER.format( "no-bean-form-rows", component.getId() ); |
57 |
|
} |
58 |
|
|
59 |
|
} |