KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlDataTableTagBase


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.taglib.html;
17
18 import org.apache.myfaces.renderkit.JSFAttr;
19 import org.apache.myfaces.renderkit.html.HTML;
20
21 import javax.faces.component.UIComponent;
22
23 /**
24  * @author Thomas Spiegl (latest modification by $Author: matzew $)
25  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
26  * $Log: HtmlDataTableTagBase.java,v $
27  * Revision 1.4 2005/02/18 18:24:35 matzew
28  * added release() to tag clazzes.
29  *
30  * Revision 1.3 2004/10/13 11:51:01 matze
31  * renamed packages to org.apache
32  *
33  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
34  * ASF switch
35  *
36  * Revision 1.1 2004/03/31 11:58:44 manolito
37  * custom component refactoring
38  *
39  */

40 public abstract class HtmlDataTableTagBase
41         extends HtmlComponentBodyTagBase
42 {
43     //private static final Log log = LogFactory.getLog(MyfacesHtmlDataTableTag.class);
44

45     // UIComponent attributes --> already implemented in UIComponentTagBase
46

47     // user role attributes --> already implemented in UIComponentTagBase
48

49     // HTML universal attributes --> already implemented in HtmlComponentTagBase
50

51     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
52

53     // HTML table attributes relevant for Table
54
private String JavaDoc _align;
55     private String JavaDoc _border;
56     private String JavaDoc _bgcolor;
57     private String JavaDoc _cellpadding;
58     private String JavaDoc _cellspacing;
59     private String JavaDoc _datafld;
60     private String JavaDoc _datasrc;
61     private String JavaDoc _dataformatas;
62     private String JavaDoc _frame;
63     private String JavaDoc _rules;
64     private String JavaDoc _summary;
65     private String JavaDoc _width;
66
67     // UIPanel attributes
68
// value and converterId --> already implemented in UIComponentTagBase
69

70     // HtmlPanelGrid attributes
71
private String JavaDoc _columnClasses;
72     private String JavaDoc _columns;
73     private String JavaDoc _footerClass;
74     private String JavaDoc _headerClass;
75     private String JavaDoc _rowClasses;
76
77     // UIData attributes
78
private String JavaDoc _rows;
79     private String JavaDoc _var;
80     private String JavaDoc _first;
81
82     public void release() {
83         super.release();
84         _align=null;
85         _border=null;
86         _bgcolor=null;
87         _cellpadding=null;
88         _cellspacing=null;
89         _datafld=null;
90         _datasrc=null;
91         _dataformatas=null;
92         _frame=null;
93         _rules=null;
94         _summary=null;
95         _width=null;
96         _columnClasses=null;
97         _columns=null;
98         _footerClass=null;
99         _headerClass=null;
100         _rowClasses=null;
101         _rows=null;
102         _var=null;
103         _first=null;
104     }
105
106     protected void setProperties(UIComponent component)
107     {
108         super.setProperties(component);
109
110         setStringProperty(component, HTML.ALIGN_ATTR, _align);
111         setIntegerProperty(component, HTML.BORDER_ATTR, _border);
112         setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
113         setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
114         setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
115         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
116         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
117         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
118         setStringProperty(component, HTML.FRAME_ATTR, _frame);
119         setStringProperty(component, HTML.RULES_ATTR, _rules);
120         setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
121         setStringProperty(component, HTML.WIDTH_ATTR, _width);
122
123         setStringProperty(component, JSFAttr.COLUMN_CLASSES_ATTR, _columnClasses);
124         setIntegerProperty(component, JSFAttr.COLUMNS_ATTR, _columns);
125         setStringProperty(component, JSFAttr.FOOTER_CLASS_ATTR, _footerClass);
126         setStringProperty(component, JSFAttr.HEADER_CLASS_ATTR, _headerClass);
127         setStringProperty(component, JSFAttr.ROW_CLASSES_ATTR, _rowClasses);
128
129         setIntegerProperty(component, JSFAttr.ROWS_ATTR, _rows);
130         setStringProperty(component, JSFAttr.VAR_ATTR, _var);
131         setIntegerProperty(component, JSFAttr.FIRST_ATTR, _first);
132     }
133
134
135
136     public void setAlign(String JavaDoc align)
137     {
138         _align = align;
139     }
140
141     public void setBorder(String JavaDoc border)
142     {
143         _border = border;
144     }
145
146     public void setBgcolor(String JavaDoc bgcolor)
147     {
148         _bgcolor = bgcolor;
149     }
150
151     public void setCellpadding(String JavaDoc cellpadding)
152     {
153         _cellpadding = cellpadding;
154     }
155
156     public void setCellspacing(String JavaDoc cellspacing)
157     {
158         _cellspacing = cellspacing;
159     }
160
161     public void setDatafld(String JavaDoc datafld)
162     {
163         _datafld = datafld;
164     }
165
166     public void setDatasrc(String JavaDoc datasrc)
167     {
168         _datasrc = datasrc;
169     }
170
171     public void setDataformatas(String JavaDoc dataformatas)
172     {
173         _dataformatas = dataformatas;
174     }
175
176     public void setFrame(String JavaDoc frame)
177     {
178         _frame = frame;
179     }
180
181     public void setRules(String JavaDoc rules)
182     {
183         _rules = rules;
184     }
185
186     public void setSummary(String JavaDoc summary)
187     {
188         _summary = summary;
189     }
190
191     public void setWidth(String JavaDoc width)
192     {
193         _width = width;
194     }
195
196     public void setColumnClasses(String JavaDoc columnClasses)
197     {
198         _columnClasses = columnClasses;
199     }
200
201     public void setColumns(String JavaDoc columns)
202     {
203         _columns = columns;
204     }
205
206     public void setFooterClass(String JavaDoc footerClass)
207     {
208         _footerClass = footerClass;
209     }
210
211     public void setHeaderClass(String JavaDoc headerClass)
212     {
213         _headerClass = headerClass;
214     }
215
216     public void setRowClasses(String JavaDoc rowClasses)
217     {
218         _rowClasses = rowClasses;
219     }
220
221     public void setRows(String JavaDoc rows)
222     {
223         _rows = rows;
224     }
225
226     public void setVar(String JavaDoc var)
227     {
228         _var = var;
229     }
230
231     public void setFirst(String JavaDoc first)
232     {
233         _first = first;
234     }
235 }
236
Popular Tags