View Javadoc

1   package org.rcfaces.core.component;
2   
3   import org.rcfaces.core.internal.component.Properties;
4   import javax.el.ValueExpression;
5   import org.rcfaces.core.component.familly.IContentAccessors;
6   import org.apache.commons.logging.Log;
7   import java.util.HashSet;
8   import org.rcfaces.core.component.FieldSetComponent;
9   import org.apache.commons.logging.LogFactory;
10  import java.util.Arrays;
11  import java.util.Set;
12  import org.rcfaces.core.component.capability.IForCapability;
13  import org.rcfaces.core.component.capability.ISeverityImagesCapability;
14  import org.rcfaces.core.component.capability.ISeverityStyleClassCapability;
15  
16  public class MessageFieldSetComponent extends FieldSetComponent implements 
17  	IForCapability,
18  	ISeverityStyleClassCapability,
19  	ISeverityImagesCapability {
20  
21  	private static final Log LOG = LogFactory.getLog(MessageFieldSetComponent.class);
22  
23  	public static final String COMPONENT_TYPE="org.rcfaces.core.messageFieldSet";
24  
25  	protected static final Set CAMELIA_ATTRIBUTES=new HashSet(FieldSetComponent.CAMELIA_ATTRIBUTES);
26  	static {
27  		CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"fatalStyleClass","for","styleClass","fatalImageURL","setFocusIfMessage","showActiveComponentMessage","errorStyleClass","warnStyleClass","infoStyleClass","infoImageURL","warnImageURL","errorImageURL","imageURL"}));
28  	}
29  
30  	public MessageFieldSetComponent() {
31  		setRendererType(COMPONENT_TYPE);
32  	}
33  
34  	public MessageFieldSetComponent(String componentId) {
35  		this();
36  		setId(componentId);
37  	}
38  
39  	public java.lang.String getFor() {
40  		return getFor(null);
41  	}
42  
43  	/**
44  	 * See {@link #getFor() getFor()} for more details
45  	 */
46  	public java.lang.String getFor(javax.faces.context.FacesContext facesContext) {
47  		return engine.getStringProperty(Properties.FOR, facesContext);
48  	}
49  
50  	/**
51  	 * Returns <code>true</code> if the attribute "for" is set.
52  	 * @return <code>true</code> if the attribute is set.
53  	 */
54  	public final boolean isForSetted() {
55  		return engine.isPropertySetted(Properties.FOR);
56  	}
57  
58  	public void setFor(java.lang.String forValue) {
59  		engine.setProperty(Properties.FOR, forValue);
60  	}
61  
62  	public java.lang.String getErrorStyleClass() {
63  		return getErrorStyleClass(null);
64  	}
65  
66  	/**
67  	 * See {@link #getErrorStyleClass() getErrorStyleClass()} for more details
68  	 */
69  	public java.lang.String getErrorStyleClass(javax.faces.context.FacesContext facesContext) {
70  		return engine.getStringProperty(Properties.ERROR_STYLE_CLASS, facesContext);
71  	}
72  
73  	/**
74  	 * Returns <code>true</code> if the attribute "errorStyleClass" is set.
75  	 * @return <code>true</code> if the attribute is set.
76  	 */
77  	public final boolean isErrorStyleClassSetted() {
78  		return engine.isPropertySetted(Properties.ERROR_STYLE_CLASS);
79  	}
80  
81  	public void setErrorStyleClass(java.lang.String errorStyleClass) {
82  		engine.setProperty(Properties.ERROR_STYLE_CLASS, errorStyleClass);
83  	}
84  
85  	public java.lang.String getFatalStyleClass() {
86  		return getFatalStyleClass(null);
87  	}
88  
89  	/**
90  	 * See {@link #getFatalStyleClass() getFatalStyleClass()} for more details
91  	 */
92  	public java.lang.String getFatalStyleClass(javax.faces.context.FacesContext facesContext) {
93  		return engine.getStringProperty(Properties.FATAL_STYLE_CLASS, facesContext);
94  	}
95  
96  	/**
97  	 * Returns <code>true</code> if the attribute "fatalStyleClass" is set.
98  	 * @return <code>true</code> if the attribute is set.
99  	 */
100 	public final boolean isFatalStyleClassSetted() {
101 		return engine.isPropertySetted(Properties.FATAL_STYLE_CLASS);
102 	}
103 
104 	public void setFatalStyleClass(java.lang.String fatalStyleClass) {
105 		engine.setProperty(Properties.FATAL_STYLE_CLASS, fatalStyleClass);
106 	}
107 
108 	public java.lang.String getInfoStyleClass() {
109 		return getInfoStyleClass(null);
110 	}
111 
112 	/**
113 	 * See {@link #getInfoStyleClass() getInfoStyleClass()} for more details
114 	 */
115 	public java.lang.String getInfoStyleClass(javax.faces.context.FacesContext facesContext) {
116 		return engine.getStringProperty(Properties.INFO_STYLE_CLASS, facesContext);
117 	}
118 
119 	/**
120 	 * Returns <code>true</code> if the attribute "infoStyleClass" is set.
121 	 * @return <code>true</code> if the attribute is set.
122 	 */
123 	public final boolean isInfoStyleClassSetted() {
124 		return engine.isPropertySetted(Properties.INFO_STYLE_CLASS);
125 	}
126 
127 	public void setInfoStyleClass(java.lang.String infoStyleClass) {
128 		engine.setProperty(Properties.INFO_STYLE_CLASS, infoStyleClass);
129 	}
130 
131 	public java.lang.String getWarnStyleClass() {
132 		return getWarnStyleClass(null);
133 	}
134 
135 	/**
136 	 * See {@link #getWarnStyleClass() getWarnStyleClass()} for more details
137 	 */
138 	public java.lang.String getWarnStyleClass(javax.faces.context.FacesContext facesContext) {
139 		return engine.getStringProperty(Properties.WARN_STYLE_CLASS, facesContext);
140 	}
141 
142 	/**
143 	 * Returns <code>true</code> if the attribute "warnStyleClass" is set.
144 	 * @return <code>true</code> if the attribute is set.
145 	 */
146 	public final boolean isWarnStyleClassSetted() {
147 		return engine.isPropertySetted(Properties.WARN_STYLE_CLASS);
148 	}
149 
150 	public void setWarnStyleClass(java.lang.String warnStyleClass) {
151 		engine.setProperty(Properties.WARN_STYLE_CLASS, warnStyleClass);
152 	}
153 
154 	public java.lang.String getErrorImageURL() {
155 		return getErrorImageURL(null);
156 	}
157 
158 	/**
159 	 * See {@link #getErrorImageURL() getErrorImageURL()} for more details
160 	 */
161 	public java.lang.String getErrorImageURL(javax.faces.context.FacesContext facesContext) {
162 		return engine.getStringProperty(Properties.ERROR_IMAGE_URL, facesContext);
163 	}
164 
165 	/**
166 	 * Returns <code>true</code> if the attribute "errorImageURL" is set.
167 	 * @return <code>true</code> if the attribute is set.
168 	 */
169 	public final boolean isErrorImageURLSetted() {
170 		return engine.isPropertySetted(Properties.ERROR_IMAGE_URL);
171 	}
172 
173 	public void setErrorImageURL(java.lang.String errorImageURL) {
174 		engine.setProperty(Properties.ERROR_IMAGE_URL, errorImageURL);
175 	}
176 
177 	public java.lang.String getFatalImageURL() {
178 		return getFatalImageURL(null);
179 	}
180 
181 	/**
182 	 * See {@link #getFatalImageURL() getFatalImageURL()} for more details
183 	 */
184 	public java.lang.String getFatalImageURL(javax.faces.context.FacesContext facesContext) {
185 		return engine.getStringProperty(Properties.FATAL_IMAGE_URL, facesContext);
186 	}
187 
188 	/**
189 	 * Returns <code>true</code> if the attribute "fatalImageURL" is set.
190 	 * @return <code>true</code> if the attribute is set.
191 	 */
192 	public final boolean isFatalImageURLSetted() {
193 		return engine.isPropertySetted(Properties.FATAL_IMAGE_URL);
194 	}
195 
196 	public void setFatalImageURL(java.lang.String fatalImageURL) {
197 		engine.setProperty(Properties.FATAL_IMAGE_URL, fatalImageURL);
198 	}
199 
200 	public java.lang.String getInfoImageURL() {
201 		return getInfoImageURL(null);
202 	}
203 
204 	/**
205 	 * See {@link #getInfoImageURL() getInfoImageURL()} for more details
206 	 */
207 	public java.lang.String getInfoImageURL(javax.faces.context.FacesContext facesContext) {
208 		return engine.getStringProperty(Properties.INFO_IMAGE_URL, facesContext);
209 	}
210 
211 	/**
212 	 * Returns <code>true</code> if the attribute "infoImageURL" is set.
213 	 * @return <code>true</code> if the attribute is set.
214 	 */
215 	public final boolean isInfoImageURLSetted() {
216 		return engine.isPropertySetted(Properties.INFO_IMAGE_URL);
217 	}
218 
219 	public void setInfoImageURL(java.lang.String infoImageURL) {
220 		engine.setProperty(Properties.INFO_IMAGE_URL, infoImageURL);
221 	}
222 
223 	public java.lang.String getWarnImageURL() {
224 		return getWarnImageURL(null);
225 	}
226 
227 	/**
228 	 * See {@link #getWarnImageURL() getWarnImageURL()} for more details
229 	 */
230 	public java.lang.String getWarnImageURL(javax.faces.context.FacesContext facesContext) {
231 		return engine.getStringProperty(Properties.WARN_IMAGE_URL, facesContext);
232 	}
233 
234 	/**
235 	 * Returns <code>true</code> if the attribute "warnImageURL" is set.
236 	 * @return <code>true</code> if the attribute is set.
237 	 */
238 	public final boolean isWarnImageURLSetted() {
239 		return engine.isPropertySetted(Properties.WARN_IMAGE_URL);
240 	}
241 
242 	public void setWarnImageURL(java.lang.String warnImageURL) {
243 		engine.setProperty(Properties.WARN_IMAGE_URL, warnImageURL);
244 	}
245 
246 	public boolean isSetFocusIfMessage() {
247 		return isSetFocusIfMessage(null);
248 	}
249 
250 	public boolean isSetFocusIfMessage(javax.faces.context.FacesContext facesContext) {
251 		return engine.getBoolProperty(Properties.SET_FOCUS_IF_MESSAGE, false, facesContext);
252 	}
253 
254 	public void setSetFocusIfMessage(boolean setFocusIfMessage) {
255 		engine.setProperty(Properties.SET_FOCUS_IF_MESSAGE, setFocusIfMessage);
256 	}
257 
258 	/**
259 	 * Returns <code>true</code> if the attribute "setFocusIfMessage" is set.
260 	 * @return <code>true</code> if the attribute is set.
261 	 */
262 	public boolean isSetFocusIfMessageSetted() {
263 		return engine.isPropertySetted(Properties.SET_FOCUS_IF_MESSAGE);
264 	}
265 
266 	public boolean isShowActiveComponentMessage() {
267 		return isShowActiveComponentMessage(null);
268 	}
269 
270 	public boolean isShowActiveComponentMessage(javax.faces.context.FacesContext facesContext) {
271 		return engine.getBoolProperty(Properties.SHOW_ACTIVE_COMPONENT_MESSAGE, false, facesContext);
272 	}
273 
274 	public void setShowActiveComponentMessage(boolean showActiveComponentMessage) {
275 		engine.setProperty(Properties.SHOW_ACTIVE_COMPONENT_MESSAGE, showActiveComponentMessage);
276 	}
277 
278 	/**
279 	 * Returns <code>true</code> if the attribute "showActiveComponentMessage" is set.
280 	 * @return <code>true</code> if the attribute is set.
281 	 */
282 	public boolean isShowActiveComponentMessageSetted() {
283 		return engine.isPropertySetted(Properties.SHOW_ACTIVE_COMPONENT_MESSAGE);
284 	}
285 
286 	protected Set getCameliaFields() {
287 		return CAMELIA_ATTRIBUTES;
288 	}
289 }