001: package com.icesoft.faces.component.effect;
002:
003: import com.icesoft.faces.context.effects.JavascriptContext;
004:
005: import javax.faces.context.FacesContext;
006: import javax.faces.el.ValueBinding;
007: import javax.faces.component.UIComponentBase;
008:
009: public class ApplyEffect extends UIComponentBase {
010: public static final String COMPONENET_TYPE = "com.icesoft.faces.ApplyEffect";
011: public static final String DEFAULT_RENDERER_TYPE = "com.icesoft.faces.ApplyEffectRenderer";
012: public static final String COMPONENT_FAMILY = "com.icesoft.faces.ApplyEffectFamily";
013: private Boolean fire;
014: private Boolean autoReset;
015: private Boolean transitory;
016: private Boolean submit;
017:
018: private String effectType;
019: private String event;
020: private String options;
021: private String sequence;
022: private Integer sequenceNumber;
023:
024: public ApplyEffect() {
025: super ();
026: JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
027: FacesContext.getCurrentInstance());
028: }
029:
030: public String getFamily() {
031: return COMPONENT_FAMILY;
032: }
033:
034: public String getRendererType() {
035: return DEFAULT_RENDERER_TYPE;
036: }
037:
038: public Boolean getFire() {
039: ValueBinding vb = getValueBinding("fire");
040: if (vb != null) {
041: return (Boolean) vb.getValue(getFacesContext());
042: }
043: if (fire != null) {
044: return fire;
045: }
046: return Boolean.FALSE;
047: }
048:
049: public void setFire(Boolean label) {
050: ValueBinding vb = getValueBinding("fire");
051: if (vb != null) {
052: vb.setValue(getFacesContext(), label);
053: } else {
054: this .fire = label;
055: }
056: }
057:
058: public Boolean getTransitory() {
059: ValueBinding vb = getValueBinding("transitory");
060: if (vb != null) {
061: return (Boolean) vb.getValue(getFacesContext());
062: }
063: if (transitory != null) {
064: return transitory;
065: }
066: return Boolean.TRUE;
067: }
068:
069: public void setTransitory(Boolean transitory) {
070: ValueBinding vb = getValueBinding("transitory");
071: if (vb != null) {
072: vb.setValue(getFacesContext(), transitory);
073: } else {
074: this .transitory = transitory;
075: }
076: }
077:
078: public Boolean getSubmit() {
079: ValueBinding vb = getValueBinding("submit");
080: if (vb != null) {
081: return (Boolean) vb.getValue(getFacesContext());
082: }
083: if (submit != null) {
084: return submit;
085: }
086: return Boolean.FALSE;
087: }
088:
089: public void setSubmit(Boolean submit) {
090: ValueBinding vb = getValueBinding("submit");
091: if (vb != null) {
092: vb.setValue(getFacesContext(), submit);
093: } else {
094: this .submit = submit;
095: }
096: }
097:
098: public Boolean getAutoReset() {
099: ValueBinding vb = getValueBinding("autoReset");
100: if (vb != null) {
101: return (Boolean) vb.getValue(getFacesContext());
102: }
103: if (autoReset != null) {
104: return autoReset;
105: }
106: return Boolean.TRUE;
107: }
108:
109: public void setAutoReset(Boolean autoReset) {
110: ValueBinding vb = getValueBinding("autoReset");
111: if (vb != null) {
112: vb.setValue(getFacesContext(), autoReset);
113: } else {
114: this .autoReset = autoReset;
115: }
116: }
117:
118: public String getOptions() {
119: ValueBinding vb = getValueBinding("options");
120: if (vb != null) {
121: return (String) vb.getValue(getFacesContext());
122: }
123: if (options != null) {
124: return options;
125: }
126: return null;
127: }
128:
129: public void setOptions(String options) {
130: ValueBinding vb = getValueBinding("options");
131: if (vb != null) {
132: vb.setValue(getFacesContext(), options);
133: } else {
134: this .options = options;
135: }
136: }
137:
138: public String getEvent() {
139: ValueBinding vb = getValueBinding("event");
140: if (vb != null) {
141: return (String) vb.getValue(getFacesContext());
142: }
143: if (event != null) {
144: return event;
145: }
146: return null;
147: }
148:
149: public void setEvent(String event) {
150: ValueBinding vb = getValueBinding("event");
151: if (vb != null) {
152: vb.setValue(getFacesContext(), event);
153: } else {
154: this .event = event;
155: }
156: }
157:
158: public String getEffectType() {
159: ValueBinding vb = getValueBinding("effectType");
160: if (vb != null) {
161: return (String) vb.getValue(getFacesContext());
162: }
163: if (effectType != null) {
164: return effectType;
165: }
166: return null;
167: }
168:
169: public void setEffectType(String effectType) {
170: ValueBinding vb = getValueBinding("effectType");
171: if (vb != null) {
172: vb.setValue(getFacesContext(), effectType);
173: } else {
174: this .effectType = effectType;
175: }
176: }
177:
178: public String getSequence() {
179: ValueBinding vb = getValueBinding("sequence");
180: if (vb != null) {
181: return (String) vb.getValue(getFacesContext());
182: }
183: if (sequence != null) {
184: return sequence;
185: }
186: return null;
187: }
188:
189: public void setSequence(String sequence) {
190: ValueBinding vb = getValueBinding("sequence");
191: if (vb != null) {
192: vb.setValue(getFacesContext(), sequence);
193: } else {
194: this .sequence = sequence;
195: }
196: }
197:
198: public Integer getSequenceNumber() {
199: ValueBinding vb = getValueBinding("sequenceNumber");
200: if (vb != null) {
201: return (Integer) vb.getValue(getFacesContext());
202: }
203: if (sequenceNumber != null) {
204: return sequenceNumber;
205: }
206: return new Integer(0);
207: }
208:
209: public void setSequenceNumber(Integer sequenceNumber) {
210: ValueBinding vb = getValueBinding("sequenceNumber");
211: if (vb != null) {
212: vb.setValue(getFacesContext(), sequenceNumber);
213: } else {
214: this.sequenceNumber = sequenceNumber;
215: }
216: }
217:
218: }
|