KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > common > tag > data > ColumnTag


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.data;
18
19 import javax.faces.component.UIComponent;
20
21 import org.alfresco.web.ui.common.tag.BaseComponentTag;
22
23
24 /**
25  * @author kevinr
26  */

27 public class ColumnTag extends BaseComponentTag
28 {
29    /**
30     * @see javax.faces.webapp.UIComponentTag#getComponentType()
31     */

32    public String JavaDoc getComponentType()
33    {
34       return "org.alfresco.faces.RichListColumn";
35    }
36
37    /**
38     * @see javax.faces.webapp.UIComponentTag#getRendererType()
39     */

40    public String JavaDoc getRendererType()
41    {
42       // the component is renderer by the parent
43
return null;
44    }
45    
46    /**
47     * @see javax.servlet.jsp.tagext.Tag#release()
48     */

49    public void release()
50    {
51       super.release();
52       this.primary = null;
53       this.actions = null;
54       this.width = null;
55       this.style = null;
56       this.styleClass = null;
57    }
58    
59    /**
60     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
61     */

62    protected void setProperties(UIComponent component)
63    {
64       super.setProperties(component);
65       
66       setBooleanProperty(component, "primary", this.primary);
67       setBooleanProperty(component, "actions", this.actions);
68       setStringProperty(component, "width", this.width);
69       setStringProperty(component, "style", this.style);
70       setStringProperty(component, "styleClass", this.styleClass);
71    }
72    
73    
74    // ------------------------------------------------------------------------------
75
// Tag properties
76

77    /**
78     * Set if this is the primary column
79     *
80     * @param primary the primary if "true", otherwise false
81     */

82    public void setPrimary(String JavaDoc primary)
83    {
84       this.primary = primary;
85    }
86    
87    /**
88     * Set the width
89     *
90     * @param width the width
91     */

92    public void setWidth(String JavaDoc width)
93    {
94       this.width = width;
95    }
96    
97    /**
98     * Set the style
99     *
100     * @param style the style
101     */

102    public void setStyle(String JavaDoc style)
103    {
104       this.style = style;
105    }
106
107    /**
108     * Set the styleClass
109     *
110     * @param styleClass the styleClass
111     */

112    public void setStyleClass(String JavaDoc styleClass)
113    {
114       this.styleClass = styleClass;
115    }
116    
117    /**
118     * Set if this is the actions column
119     *
120     * @param actions the actions if "true", otherwise false
121     */

122    public void setActions(String JavaDoc actions)
123    {
124       this.actions = actions;
125    }
126
127
128    /** the actions */
129    private String JavaDoc actions;
130    
131    /** the style */
132    private String JavaDoc style;
133
134    /** the styleClass */
135    private String JavaDoc styleClass;
136
137    /** the width */
138    private String JavaDoc width;
139
140    /** the primary */
141    private String JavaDoc primary;
142 }
143
Popular Tags