KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > repo > tag > property > PropertySheetGridTag


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.repo.tag.property;
18
19 import javax.faces.component.UIComponent;
20 import org.alfresco.web.ui.common.tag.BaseComponentTag;
21
22 /**
23  * Tag to represent the combination of a PropertySheet component
24  * and a Grid renderer
25  *
26  * @author gavinc
27  */

28 public class PropertySheetGridTag extends BaseComponentTag
29 {
30    private String JavaDoc value;
31    private String JavaDoc var;
32    private String JavaDoc columns;
33    private String JavaDoc externalConfig;
34    private String JavaDoc configArea;
35    private String JavaDoc readOnly;
36    private String JavaDoc mode;
37    private String JavaDoc labelStyleClass;
38    private String JavaDoc cellpadding;
39    private String JavaDoc cellspacing;
40    
41    /**
42     * @see javax.faces.webapp.UIComponentTag#getComponentType()
43     */

44    public String JavaDoc getComponentType()
45    {
46       return "org.alfresco.faces.PropertySheet";
47    }
48
49    /**
50     * @see javax.faces.webapp.UIComponentTag#getRendererType()
51     */

52    public String JavaDoc getRendererType()
53    {
54       return "javax.faces.Grid";
55    }
56    
57    /**
58     * @param value The value to set.
59     */

60    public void setValue(String JavaDoc value)
61    {
62       this.value = value;
63    }
64    
65    /**
66     * @param var The var to set.
67     */

68    public void setVar(String JavaDoc var)
69    {
70       this.var = var;
71    }
72
73    /**
74     * @param columns The columns to set.
75     */

76    public void setColumns(String JavaDoc columns)
77    {
78       this.columns = columns;
79    }
80
81    /**
82     * @param externalConfig The externalConfig to set.
83     */

84    public void setExternalConfig(String JavaDoc externalConfig)
85    {
86       this.externalConfig = externalConfig;
87    }
88    
89    /**
90     * @param configArea Sets the named config area to use
91     */

92    public void setConfigArea(String JavaDoc configArea)
93    {
94       this.configArea = configArea;
95    }
96
97    /**
98     * @param mode The mode, either "edit" or "view"
99     */

100    public void setMode(String JavaDoc mode)
101    {
102       this.mode = mode;
103    }
104
105    /**
106     * @param readOnly The readOnly to set.
107     */

108    public void setReadOnly(String JavaDoc readOnly)
109    {
110       this.readOnly = readOnly;
111    }
112    
113    /**
114     * @param labelStyleClass Sets the style class for the label column
115     */

116    public void setLabelStyleClass(String JavaDoc labelStyleClass)
117    {
118       this.labelStyleClass = labelStyleClass;
119    }
120
121    /**
122     * @param cellpadding Sets the cellpadding for the grid
123     */

124    public void setCellpadding(String JavaDoc cellpadding)
125    {
126       this.cellpadding = cellpadding;
127    }
128
129    /**
130     * @param cellspacing Sets the cellspacing for the grid
131     */

132    public void setCellspacing(String JavaDoc cellspacing)
133    {
134       this.cellspacing = cellspacing;
135    }
136
137    /**
138     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
139     */

140    protected void setProperties(UIComponent component)
141    {
142       super.setProperties(component);
143       
144       setStringProperty(component, "value", this.value);
145       setStringProperty(component, "mode", this.mode);
146       setStringProperty(component, "configArea", this.configArea);
147       setStringStaticProperty(component, "var", this.var);
148       setIntProperty(component, "columns", this.columns);
149       setStringStaticProperty(component, "labelStyleClass", this.labelStyleClass);
150       setBooleanProperty(component, "externalConfig", this.externalConfig);
151       setBooleanProperty(component, "readOnly", this.readOnly);
152       setStringStaticProperty(component, "cellpadding", this.cellpadding);
153       setStringStaticProperty(component, "cellspacing", this.cellspacing);
154    }
155
156    /**
157     * @see javax.faces.webapp.UIComponentTag#release()
158     */

159    public void release()
160    {
161       this.value = null;
162       this.var = null;
163       this.columns = null;
164       this.externalConfig = null;
165       this.configArea = null;
166       this.readOnly = null;
167       this.mode = null;
168       this.labelStyleClass = null;
169       this.cellpadding = null;
170       this.cellspacing = null;
171       
172       super.release();
173    }
174 }
175
Popular Tags