View Javadoc

1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
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   This tag adds script files to include to the rendered page.
39    Deprecated (CSP): This tag adds client side script to the rendered page.
40    * UIComponent class, generated from template {@code component2.0.stg} with class
41    * {@link org.apache.myfaces.tobago.internal.taglib.component.ScriptTagDeclaration}.
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 }