2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.validator.faces;
19
20 import javax.faces.component.UIComponent;
21 import javax.faces.context.FacesContext;
22 import javax.faces.webapp.UIComponentTag;
23 import org.apache.shale.faces.ShaleConstants;
24
25 /***
26 * The tag class for the <code>s:validatorScript</code> tag.
27 *
28 * $Id: ValidatorScriptTag.java 464373 2006-10-16 04:21:54Z rahul $
29 */
30 public class ValidatorScriptTag extends UIComponentTag {
31
32
33 /***
34 * <p>The function name for validating the enclosing form.</p>
35 */
36 private String functionName;
37
38
39 /***
40 * <p>A Utility object to aid in developing JSF tags. See
41 * <code>org.apache.shale.util.Tags</code> for more
42 * information.</p>
43 */
44 private org.apache.shale.util.Tags tagUtils = null;
45
46
47 /***
48 * <p>This constructor retrieves a managed bean
49 * that has utility methods for implementing JSP
50 * custom tags for JSF components.</p>
51 */
52 public ValidatorScriptTag() {
53 FacesContext context = FacesContext.getCurrentInstance();
54 tagUtils = (org.apache.shale.util.Tags) context
55 .getApplication()
56 .getVariableResolver()
57 .resolveVariable(context, ShaleConstants.TAG_UTILITY_BEAN);
58 }
59
60
61 /***
62 * <p>Setter method for the function name.</p>
63 *
64 * @param newValue The new value for the function name.
65 */
66 public void setFunctionName(String newValue) {
67 functionName = newValue;
68 }
69
70
71 /***
72 * <p>Sets properties for the component.</p>
73 *
74 * @param component The component whose properties we're setting
75 */
76 public void setProperties(UIComponent component) {
77 super.setProperties(component);
78 tagUtils.setString(component, "functionName",
79 functionName);
80 }
81
82
83 /***
84 * <p>Sets the <code>functionName</code> property to null.</p>
85 */
86 public void release() {
87 functionName = null;
88 }
89
90
91 /***
92 * @return Returns the renderer type, which is null.
93 */
94 public String getRendererType() {
95 return null;
96 }
97
98
99 /***
100 * @return Returns the component type, which is
101 * <code>org.apache.shale.ValidatorScript</code>.
102 */
103 public String getComponentType() {
104 return "org.apache.shale.ValidatorScript";
105 }
106
107
108 }