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.internal.component.CameliaBaseComponent;
6   import org.apache.commons.logging.Log;
7   import java.util.HashSet;
8   import org.apache.commons.logging.LogFactory;
9   import java.util.Arrays;
10  import java.util.Set;
11  
12  public class PeriodClientDataComponent extends CameliaBaseComponent {
13  
14  	private static final Log LOG = LogFactory.getLog(PeriodClientDataComponent.class);
15  
16  	public static final String COMPONENT_TYPE="org.rcfaces.core.periodClientData";
17  
18  	protected static final Set CAMELIA_ATTRIBUTES=new HashSet(CameliaBaseComponent.CAMELIA_ATTRIBUTES);
19  	static {
20  		CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"name","value"}));
21  	}
22  
23  	public PeriodClientDataComponent() {
24  		setRendererType(null);
25  	}
26  
27  	public PeriodClientDataComponent(String componentId) {
28  		this();
29  		setId(componentId);
30  	}
31  
32  	public String getName() {
33  		return getName(null);
34  	}
35  
36  	public String getName(javax.faces.context.FacesContext facesContext) {
37  		return engine.getStringProperty(Properties.NAME, facesContext);
38  	}
39  
40  	public void setName(String name) {
41  		engine.setProperty(Properties.NAME, name);
42  	}
43  
44  	/**
45  	 * Returns <code>true</code> if the attribute "name" is set.
46  	 * @return <code>true</code> if the attribute is set.
47  	 */
48  	public boolean isNameSetted() {
49  		return engine.isPropertySetted(Properties.NAME);
50  	}
51  
52  	public String getValue() {
53  		return getValue(null);
54  	}
55  
56  	public String getValue(javax.faces.context.FacesContext facesContext) {
57  		return engine.getStringProperty(Properties.VALUE, facesContext);
58  	}
59  
60  	public void setValue(String value) {
61  		engine.setProperty(Properties.VALUE, value);
62  	}
63  
64  	/**
65  	 * Returns <code>true</code> if the attribute "value" is set.
66  	 * @return <code>true</code> if the attribute is set.
67  	 */
68  	public boolean isValueSetted() {
69  		return engine.isPropertySetted(Properties.VALUE);
70  	}
71  
72  	protected Set getCameliaFields() {
73  		return CAMELIA_ATTRIBUTES;
74  	}
75  }