1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.component;
21
22 import javax.faces.component.UIComponentBase;
23 import javax.faces.context.FacesContext;
24 import org.apache.commons.lang.ArrayUtils;
25 import org.apache.commons.lang.StringUtils;
26 import org.apache.myfaces.tobago.internal.util.Deprecation;
27 import org.apache.myfaces.tobago.renderkit.MarginValues;
28 import org.apache.myfaces.tobago.renderkit.SpacingValues;
29 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
30 import javax.el.ELException;
31 import javax.faces.FacesException;
32 import java.util.ArrayList;
33 import java.util.List;
34 import javax.el.MethodExpression;
35 import javax.el.ValueExpression;
36
37
38
39
40
41
42
43 public class UIScript
44 extends UIComponentBase {
45
46 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Script";
47
48 public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Script";
49
50
51 enum PropertyKeys {
52 onload,
53 file,
54 onunload,
55 script,
56 onexit,
57 onsubmit,
58 }
59
60 public String getFamily() {
61 return COMPONENT_FAMILY;
62 }
63
64
65 @Deprecated
66 public java.lang.String getOnload() {
67 Deprecation.LOG.error("The attribute 'onload' of 'UIScript' is deprecated. "
68 + "Please refer the documentation for further information.");
69 return (java.lang.String) getStateHelper().eval(PropertyKeys.onload);
70 }
71
72 @Deprecated
73 public void setOnload(java.lang.String onload) {
74 getStateHelper().put(PropertyKeys.onload, onload);
75 }
76
77 public java.lang.String getFile() {
78 return (java.lang.String) getStateHelper().eval(PropertyKeys.file);
79 }
80
81 public void setFile(java.lang.String file) {
82 getStateHelper().put(PropertyKeys.file, file);
83 }
84
85 @Deprecated
86 public java.lang.String getOnunload() {
87 Deprecation.LOG.error("The attribute 'onunload' of 'UIScript' is deprecated. "
88 + "Please refer the documentation for further information.");
89 return (java.lang.String) getStateHelper().eval(PropertyKeys.onunload);
90 }
91
92 @Deprecated
93 public void setOnunload(java.lang.String onunload) {
94 getStateHelper().put(PropertyKeys.onunload, onunload);
95 }
96
97 @Deprecated
98 public java.lang.String getScript() {
99 Deprecation.LOG.error("The attribute 'script' of 'UIScript' is deprecated. "
100 + "Please refer the documentation for further information.");
101 return (java.lang.String) getStateHelper().eval(PropertyKeys.script);
102 }
103
104 @Deprecated
105 public void setScript(java.lang.String script) {
106 getStateHelper().put(PropertyKeys.script, script);
107 }
108
109 @Deprecated
110 public java.lang.String getOnexit() {
111 Deprecation.LOG.error("The attribute 'onexit' of 'UIScript' is deprecated. "
112 + "Please refer the documentation for further information.");
113 return (java.lang.String) getStateHelper().eval(PropertyKeys.onexit);
114 }
115
116 @Deprecated
117 public void setOnexit(java.lang.String onexit) {
118 getStateHelper().put(PropertyKeys.onexit, onexit);
119 }
120
121 @Deprecated
122 public java.lang.String getOnsubmit() {
123 Deprecation.LOG.error("The attribute 'onsubmit' of 'UIScript' is deprecated. "
124 + "Please refer the documentation for further information.");
125 return (java.lang.String) getStateHelper().eval(PropertyKeys.onsubmit);
126 }
127
128 @Deprecated
129 public void setOnsubmit(java.lang.String onsubmit) {
130 getStateHelper().put(PropertyKeys.onsubmit, onsubmit);
131 }
132
133
134
135 }