1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.efaps.admin.datamodel.ui;
22
23 import java.io.Serializable;
24
25 import org.efaps.util.EFapsException;
26
27
28
29
30
31
32
33
34 public abstract class AbstractUI
35 implements IUIProvider, UIInterface, Serializable
36 {
37
38
39
40 private static final long serialVersionUID = 1L;
41
42
43
44
45 @Override
46 public String getEditHtml(final FieldValue _fieldValuee)
47 throws EFapsException
48 {
49 return "edit";
50 }
51
52
53
54
55 @Override
56 public String getHiddenHtml(final FieldValue _fieldValue)
57 throws EFapsException
58 {
59 return "hidden";
60 }
61
62
63
64
65 @Override
66 public String getReadOnlyHtml(final FieldValue _fieldValue)
67 throws EFapsException
68 {
69 return "read only";
70 }
71
72
73
74
75 @Override
76 public String getStringValue(final FieldValue _fieldValue)
77 throws EFapsException
78 {
79 return getReadOnlyHtml(_fieldValue);
80 }
81
82
83
84
85 @Override
86 public Object getObject4Compare(final FieldValue _fieldValue)
87 throws EFapsException
88 {
89 return null;
90 }
91
92
93
94
95
96 @Override
97 public int compare(final FieldValue _fieldValue,
98 final FieldValue _fieldValue2)
99 throws EFapsException
100 {
101 return 0;
102 }
103
104
105
106
107 @Override
108 public String validateValue(final UIValue _value)
109 throws EFapsException
110 {
111 return null;
112 }
113
114
115
116
117 @Override
118 public Object format(final Object _object,
119 final String _pattern)
120 throws EFapsException
121 {
122 return _object;
123 }
124
125
126
127
128 @Override
129 public Object getValue(final UIValue _uiValue)
130 throws EFapsException
131 {
132 return _uiValue.getDbValue();
133 }
134
135
136
137
138 @Override
139 public Object transformObject(final UIValue _uiValue,
140 final Object _object)
141 throws EFapsException
142 {
143 if (_object instanceof Serializable) {
144 _uiValue.setDbValue((Serializable) _object);
145 }
146 return _object;
147 }
148 }