1 package org.rcfaces.core.component;
2
3 import org.rcfaces.core.internal.component.Properties;
4 import javax.el.ValueExpression;
5 import org.apache.commons.logging.Log;
6 import java.util.HashSet;
7 import org.apache.commons.logging.LogFactory;
8 import java.util.Arrays;
9 import java.util.Set;
10 import org.rcfaces.core.component.ComboComponent;
11 import org.rcfaces.core.component.capability.IForCapability;
12
13 public class TextEditorComboComponent extends ComboComponent implements
14 IForCapability {
15
16 private static final Log LOG = LogFactory.getLog(TextEditorComboComponent.class);
17
18 public static final String COMPONENT_TYPE="org.rcfaces.core.textEditorCombo";
19
20 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(ComboComponent.CAMELIA_ATTRIBUTES);
21 static {
22 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"for","type"}));
23 }
24
25 public TextEditorComboComponent() {
26 setRendererType(COMPONENT_TYPE);
27 }
28
29 public TextEditorComboComponent(String componentId) {
30 this();
31 setId(componentId);
32 }
33
34 public java.lang.String getFor() {
35 return getFor(null);
36 }
37
38
39
40
41 public java.lang.String getFor(javax.faces.context.FacesContext facesContext) {
42 return engine.getStringProperty(Properties.FOR, facesContext);
43 }
44
45
46
47
48
49 public final boolean isForSetted() {
50 return engine.isPropertySetted(Properties.FOR);
51 }
52
53 public void setFor(java.lang.String forValue) {
54 engine.setProperty(Properties.FOR, forValue);
55 }
56
57
58
59
60
61 public String getType() {
62 return getType(null);
63 }
64
65
66
67
68
69 public String getType(javax.faces.context.FacesContext facesContext) {
70 return engine.getStringProperty(Properties.TYPE, facesContext);
71 }
72
73
74
75
76
77 public void setType(String type) {
78 engine.setProperty(Properties.TYPE, type);
79 }
80
81
82
83
84
85
86
87
88
89 public boolean isTypeSetted() {
90 return engine.isPropertySetted(Properties.TYPE);
91 }
92
93 protected Set getCameliaFields() {
94 return CAMELIA_ATTRIBUTES;
95 }
96 }