KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > common > tag > ListItemTag


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.web.ui.common.tag;
18
19 import javax.faces.component.UIComponent;
20
21 /**
22  * @author kevinr
23  */

24 public class ListItemTag extends BaseComponentTag
25 {
26    /**
27     * @see javax.faces.webapp.UIComponentTag#getComponentType()
28     */

29    public String JavaDoc getComponentType()
30    {
31       return "org.alfresco.faces.ListItem";
32    }
33
34    /**
35     * @see javax.faces.webapp.UIComponentTag#getRendererType()
36     */

37    public String JavaDoc getRendererType()
38    {
39       // this component is rendered by its parent container
40
return null;
41    }
42
43    /**
44     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
45     */

46    protected void setProperties(UIComponent component)
47    {
48       super.setProperties(component);
49       setStringProperty(component, "tooltip", this.tooltip);
50       setStringProperty(component, "label", this.label);
51       setStringProperty(component, "image", this.image);
52       setStringProperty(component, "value", this.value);
53       setBooleanProperty(component, "disabled", this.disabled);
54    }
55    
56    /**
57     * @see javax.servlet.jsp.tagext.Tag#release()
58     */

59    public void release()
60    {
61       super.release();
62       this.tooltip = null;
63       this.label = null;
64       this.image = null;
65       this.value = null;
66       this.disabled = null;
67    }
68    
69    /**
70     * Set the tooltip
71     *
72     * @param tooltip the tooltip
73     */

74    public void setTooltip(String JavaDoc tooltip)
75    {
76       this.tooltip = tooltip;
77    }
78
79    /**
80     * Set the label
81     *
82     * @param label the label
83     */

84    public void setLabel(String JavaDoc label)
85    {
86       this.label = label;
87    }
88
89    /**
90     * Set the image
91     *
92     * @param image the image
93     */

94    public void setImage(String JavaDoc image)
95    {
96       this.image = image;
97    }
98
99    /**
100     * Set the value to be selected initially
101     *
102     * @param value the value to be selected initially
103     */

104    public void setValue(String JavaDoc value)
105    {
106       this.value = value;
107    }
108    
109    /**
110     * Set the disabled flag
111     *
112     * @param disabled true to set this item as disabled
113     */

114    public void setDisabled(String JavaDoc disabled)
115    {
116       this.disabled = disabled;
117    }
118
119    /** the tooltip */
120    private String JavaDoc tooltip;
121
122    /** the label */
123    private String JavaDoc label;
124
125    /** the image */
126    private String JavaDoc image;
127
128    /** the value to be selected initially */
129    private String JavaDoc value;
130    
131    /** the disabled flag */
132    private String JavaDoc disabled;
133 }
134
Popular Tags