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.context.FacesContext;
23 import org.apache.myfaces.tobago.internal.component.AbstractUIScript;
24 import org.apache.myfaces.tobago.internal.util.ArrayUtils;
25 import org.apache.myfaces.tobago.internal.util.StringUtils;
26 import org.apache.myfaces.tobago.internal.util.Deprecation;
27 import org.apache.myfaces.tobago.component.Tags;
28 import javax.annotation.Generated;
29 import javax.el.ELException;
30 import javax.faces.FacesException;
31 import java.util.Arrays;
32 import java.util.ArrayList;
33 import java.util.Collection;
34 import java.util.List;
35 import javax.el.MethodExpression;
36 import javax.el.ValueExpression;
37
38
39
40
41
42
43
44
45 @Generated("component.stg")
46 public class UIScript
47 extends AbstractUIScript {
48
49 public static final String COMPONENT_TYPE = Tags.script.componentType();
50
51 public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Script";
52
53
54 enum PropertyKeys {
55 file,
56 type,
57 }
58
59 public String getFamily() {
60 return COMPONENT_FAMILY;
61 }
62
63
64
65
66
67
68
69
70 public java.lang.String getFile() {
71 return (java.lang.String) getStateHelper().eval(PropertyKeys.file);
72 }
73
74 public void setFile(java.lang.String file) {
75 getStateHelper().put(PropertyKeys.file, file);
76 }
77
78
79
80
81
82 public java.lang.String getType() {
83 java.lang.String type = (java.lang.String) getStateHelper().eval(PropertyKeys.type);
84 if (type != null) {
85 return type;
86 }
87 return "text/javascript";
88 }
89
90 public void setType(java.lang.String type) {
91 getStateHelper().put(PropertyKeys.type, type);
92 }
93
94
95 @Override
96 public void restoreState(FacesContext context, Object state) {
97
98 pushComponentToEL(context, this);
99 super.restoreState(context, state);
100 popComponentFromEL(context);
101 }
102
103 }