2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.validator.converter;
19
20 import javax.faces.component.UIComponent;
21 import javax.faces.context.FacesContext;
22
23 /***
24 * <p>Simple concrete implementation of <code>AbstractConverter</code>.</p>
25 */
26 public class ConcreteConverter extends AbstractConverter {
27
28
29 public Object getAsObject(FacesContext context, UIComponent component,
30 String value) {
31 return value;
32 }
33
34
35 public String getAsString(FacesContext context, UIComponent component,
36 Object value) {
37 if (value == null) {
38 return null;
39 } else {
40 return value.toString();
41 }
42 }
43
44
45
46
47
48 public String message(FacesContext context, String key) {
49 return super.message(context, key);
50 }
51
52
53
54 }