1 package org.rcfaces.core.component;
2
3 import org.rcfaces.core.internal.component.Properties;
4 import org.rcfaces.core.component.capability.IOverStyleClassCapability;
5 import javax.el.ValueExpression;
6 import org.apache.commons.logging.Log;
7 import java.util.HashSet;
8 import org.rcfaces.core.component.AbstractOutputComponent;
9 import org.apache.commons.logging.LogFactory;
10 import java.util.Arrays;
11 import java.util.Set;
12 import org.rcfaces.core.component.capability.ILoadEventCapability;
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 public class ExternalBoxComponent extends AbstractOutputComponent implements
47 ILoadEventCapability,
48 IOverStyleClassCapability {
49
50 private static final Log LOG = LogFactory.getLog(ExternalBoxComponent.class);
51
52 public static final String COMPONENT_TYPE="org.rcfaces.core.externalBox";
53
54 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(AbstractOutputComponent.CAMELIA_ATTRIBUTES);
55 static {
56 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"scrolling","overStyleClass","contentURL","loadListener"}));
57 }
58 protected static final String CAMELIA_VALUE_ALIAS="contentURL";
59
60 public ExternalBoxComponent() {
61 setRendererType(COMPONENT_TYPE);
62 }
63
64 public ExternalBoxComponent(String componentId) {
65 this();
66 setId(componentId);
67 }
68
69 public final void addLoadListener(org.rcfaces.core.event.ILoadListener listener) {
70 addFacesListener(listener);
71 }
72
73 public final void removeLoadListener(org.rcfaces.core.event.ILoadListener listener) {
74 removeFacesListener(listener);
75 }
76
77 public final javax.faces.event.FacesListener [] listLoadListeners() {
78 return getFacesListeners(org.rcfaces.core.event.ILoadListener.class);
79 }
80
81 public java.lang.String getOverStyleClass() {
82 return getOverStyleClass(null);
83 }
84
85
86
87
88 public java.lang.String getOverStyleClass(javax.faces.context.FacesContext facesContext) {
89 return engine.getStringProperty(Properties.OVER_STYLE_CLASS, facesContext);
90 }
91
92
93
94
95
96 public final boolean isOverStyleClassSetted() {
97 return engine.isPropertySetted(Properties.OVER_STYLE_CLASS);
98 }
99
100 public void setOverStyleClass(java.lang.String overStyleClass) {
101 engine.setProperty(Properties.OVER_STYLE_CLASS, overStyleClass);
102 }
103
104 public String getScrolling() {
105 return getScrolling(null);
106 }
107
108 public String getScrolling(javax.faces.context.FacesContext facesContext) {
109 return engine.getStringProperty(Properties.SCROLLING, facesContext);
110 }
111
112 public void setScrolling(String scrolling) {
113 engine.setProperty(Properties.SCROLLING, scrolling);
114 }
115
116
117
118
119
120 public boolean isScrollingSetted() {
121 return engine.isPropertySetted(Properties.SCROLLING);
122 }
123
124 public String getContentURL() {
125 return getContentURL(null);
126 }
127
128 public String getContentURL(javax.faces.context.FacesContext facesContext) {
129 return engine.getStringProperty(Properties.CONTENT_URL, facesContext);
130 }
131
132 public void setContentURL(String contentURL) {
133 engine.setProperty(Properties.CONTENT_URL, contentURL);
134 }
135
136
137
138
139
140 public boolean isContentURLSetted() {
141 return engine.isPropertySetted(Properties.CONTENT_URL);
142 }
143
144 protected Set getCameliaFields() {
145 return CAMELIA_ATTRIBUTES;
146 }
147
148 protected String getCameliaValueAlias() {
149 return CAMELIA_VALUE_ALIAS;
150 }
151 }