1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.taglib.html.ext;
20
21 import org.apache.myfaces.component.UserRoleAware;
22 import org.apache.myfaces.component.html.ext.HtmlDataTable;
23 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlDataTableTagBase;
24 import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
25
26 import javax.faces.component.UIComponent;
27
28
29
30
31
32 public class HtmlDataTableTag
33 extends HtmlDataTableTagBase
34 {
35
36
37 public String getComponentType()
38 {
39 return HtmlDataTable.COMPONENT_TYPE;
40 }
41
42 public String getRendererType()
43 {
44 return HtmlDataTable.DEFAULT_RENDERER_TYPE;
45 }
46
47 private String _preserveDataModel;
48 private String _preserveRowStates;
49 private String _forceIdIndexFormula;
50 private String _sortColumn;
51 private String _sortAscending;
52 private String _sortable;
53 private String _preserveSort;
54 private String _enabledOnUserRole;
55 private String _visibleOnUserRole;
56 private String _renderedIfEmpty;
57 private String _rowIndexVar;
58 private String _rowCountVar;
59 private String _previousRowDataVar;
60 private String _sortedColumnVar;
61 private String _rowOnClick;
62 private String _rowOnDblClick;
63 private String _rowOnMouseDown;
64 private String _rowOnMouseUp;
65 private String _rowOnMouseOver;
66 private String _rowOnMouseMove;
67 private String _rowOnMouseOut;
68 private String _rowOnKeyPress;
69 private String _rowOnKeyDown;
70 private String _rowOnKeyUp;
71 private String _rowId;
72 private String _varDetailToggler;
73
74 private String _rowStyleClass;
75 private String _rowStyle;
76 private String _rowGroupStyle;
77 private String _rowGroupStyleClass;
78
79 private String _bodyStyle;
80 private String _bodyStyleClass;
81
82
83 private String _newspaperColumns = null;
84
85 private String _newspaperOrientation = null;
86
87 private String _embedded = null;
88 private String _detailStampExpandedDefault = null;
89 private String _detailStampLocation = null;
90
91 public void release()
92 {
93 super.release();
94
95 _preserveDataModel=null;
96 _preserveRowStates = null;
97 _forceIdIndexFormula=null;
98 _sortColumn=null;
99 _sortAscending=null;
100 _sortable=null;
101 _preserveSort=null;
102 _enabledOnUserRole=null;
103 _visibleOnUserRole=null;
104 _renderedIfEmpty=null;
105 _rowIndexVar=null;
106 _rowCountVar=null;
107 _previousRowDataVar=null;
108 _sortedColumnVar=null;
109 _rowOnClick=null;
110 _rowOnDblClick=null;
111 _rowOnMouseDown=null;
112 _rowOnMouseUp=null;
113 _rowOnMouseOver=null;
114 _rowOnMouseMove=null;
115 _rowOnMouseOut=null;
116 _rowOnKeyPress=null;
117 _rowOnKeyDown=null;
118 _rowOnKeyUp=null;
119 _rowId=null;
120 _varDetailToggler=null;
121
122 _rowStyleClass = null;
123 _rowStyle = null;
124 _rowGroupStyle = null;
125 _rowGroupStyleClass = null;
126
127 _newspaperColumns = null;
128 _newspaperOrientation = null;
129
130 _bodyStyle = null;
131 _bodyStyleClass = null;
132
133 _embedded = null;
134 _detailStampExpandedDefault = null;
135 _detailStampLocation = null;
136 }
137
138 protected void setProperties(UIComponent component)
139 {
140 super.setProperties(component);
141
142 setBooleanProperty(component, "preserveDataModel", _preserveDataModel);
143 setBooleanProperty(component, "preserveRowStates", _preserveRowStates);
144 setValueBinding(component, "forceIdIndexFormula", _forceIdIndexFormula);
145 setValueBinding(component, "sortColumn", _sortColumn);
146 setValueBinding(component, "sortAscending", _sortAscending);
147 setBooleanProperty(component, "sortable", _sortable);
148 setBooleanProperty(component, "preserveSort", _preserveSort);
149 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
150 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
151 setBooleanProperty(component, "renderedIfEmpty", _renderedIfEmpty);
152 setStringProperty(component, "rowIndexVar", _rowIndexVar);
153 setStringProperty(component, "rowCountVar", _rowCountVar);
154 setStringProperty(component, "previousRowDataVar", _previousRowDataVar);
155 setStringProperty(component, "sortedColumnVar", _sortedColumnVar);
156 setStringProperty(component, "rowOnClick", _rowOnClick);
157 setStringProperty(component, "rowOnDblClick", _rowOnDblClick);
158 setStringProperty(component, "rowOnMouseDown", _rowOnMouseDown);
159 setStringProperty(component, "rowOnMouseUp", _rowOnMouseUp);
160 setStringProperty(component, "rowOnMouseOver", _rowOnMouseOver);
161 setStringProperty(component, "rowOnMouseMove", _rowOnMouseMove);
162 setStringProperty(component, "rowOnMouseOut", _rowOnMouseOut);
163 setStringProperty(component, "rowOnKeyPress", _rowOnKeyPress);
164 setStringProperty(component, "rowOnKeyDown", _rowOnKeyDown);
165 setStringProperty(component, "rowOnKeyUp", _rowOnKeyUp);
166 setStringProperty(component, JSFAttr.ROW_ID, _rowId);
167 setStringProperty(component,"varDetailToggler",_varDetailToggler);
168
169 setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
170 setStringProperty(component, JSFAttr.ROW_STYLE_ATTR, _rowStyle);
171 setStringProperty(component, "rowGroupStyle", _rowGroupStyle);
172 setStringProperty(component, "rowGroupStyleClass", _rowGroupStyleClass);
173
174 setStringProperty(component, "bodyStyle", _bodyStyle);
175 setStringProperty(component, "bodyStyleClass", _bodyStyleClass);
176
177 setIntegerProperty(component, HtmlDataTable.NEWSPAPER_COLUMNS_PROPERTY, _newspaperColumns);
178 setStringProperty(component, HtmlDataTable.NEWSPAPER_ORIENTATION_PROPERTY, _newspaperOrientation);
179
180 setBooleanProperty(component, "embedded", _embedded);
181 setBooleanProperty(component, "detailStampExpandedDefault", _detailStampExpandedDefault);
182 setStringProperty(component, "detailStampLocation", _detailStampLocation);
183 }
184
185 public void setPreserveDataModel(String preserveDataModel)
186 {
187 _preserveDataModel = preserveDataModel;
188 }
189
190 public void setPreserveRowStates(String preserveRowStates)
191 {
192 _preserveRowStates = preserveRowStates;
193 }
194
195 public void setForceIdIndexFormula(String forceIdIndexFormula)
196 {
197 _forceIdIndexFormula = forceIdIndexFormula;
198 }
199
200 public void setSortColumn(String sortColumn)
201 {
202 _sortColumn = sortColumn;
203 }
204
205 public void setSortAscending(String sortAscending)
206 {
207 _sortAscending = sortAscending;
208 }
209
210 public void setSortable(String sortable)
211 {
212 _sortable = sortable;
213 }
214
215 public void setPreserveSort(String preserveSort)
216 {
217 _preserveSort = preserveSort;
218 }
219
220 public void setEnabledOnUserRole(String enabledOnUserRole)
221 {
222 _enabledOnUserRole = enabledOnUserRole;
223 }
224
225 public void setVisibleOnUserRole(String visibleOnUserRole)
226 {
227 _visibleOnUserRole = visibleOnUserRole;
228 }
229
230 public void setRenderedIfEmpty(String renderedIfEmpty)
231 {
232 _renderedIfEmpty = renderedIfEmpty;
233 }
234
235 public void setRowIndexVar(String rowIndexVar)
236 {
237 _rowIndexVar = rowIndexVar;
238 }
239
240 public void setRowCountVar(String rowCountVar)
241 {
242 _rowCountVar = rowCountVar;
243 }
244
245 public void setPreviousRowDataVar(String previousRowDataVar)
246 {
247 _previousRowDataVar = previousRowDataVar;
248 }
249
250 public void setSortedColumnVar(String sortedColumnVar)
251 {
252 _sortedColumnVar = sortedColumnVar;
253 }
254
255 public void setRowOnMouseOver(String rowOnMouseOver)
256 {
257 _rowOnMouseOver = rowOnMouseOver;
258 }
259
260 public void setRowOnMouseOut(String rowOnMouseOut)
261 {
262 _rowOnMouseOut = rowOnMouseOut;
263 }
264
265 public void setRowOnClick(String rowOnClick)
266 {
267 _rowOnClick = rowOnClick;
268 }
269
270 public void setRowOnDblClick(String rowOnDblClick)
271 {
272 _rowOnDblClick = rowOnDblClick;
273 }
274
275 public void setRowOnKeyDown(String rowOnKeyDown)
276 {
277 _rowOnKeyDown = rowOnKeyDown;
278 }
279
280 public void setRowOnKeyPress(String rowOnKeyPress)
281 {
282 _rowOnKeyPress = rowOnKeyPress;
283 }
284
285 public void setRowOnKeyUp(String rowOnKeyUp)
286 {
287 _rowOnKeyUp = rowOnKeyUp;
288 }
289
290 public void setRowOnMouseDown(String rowOnMouseDown)
291 {
292 _rowOnMouseDown = rowOnMouseDown;
293 }
294
295 public void setRowOnMouseMove(String rowOnMouseMove)
296 {
297 _rowOnMouseMove = rowOnMouseMove;
298 }
299
300 public void setRowOnMouseUp(String rowOnMouseUp)
301 {
302 _rowOnMouseUp = rowOnMouseUp;
303 }
304
305 public void setRowId(String rowId)
306 {
307 _rowId = rowId;
308 }
309
310 public void setRowStyleClass(String rowStyleClass)
311 {
312 _rowStyleClass = rowStyleClass;
313 }
314
315 public void setRowStyle(String rowStyle)
316 {
317 _rowStyle = rowStyle;
318 }
319
320 public void setRowGroupStyle(String rowGroupStyle)
321 {
322 _rowGroupStyle = rowGroupStyle;
323 }
324
325 public void setRowGroupStyleClass(String rowGroupStyleClass)
326 {
327 _rowGroupStyleClass = rowGroupStyleClass;
328 }
329
330 public String getVarDetailToggler() {
331 return _varDetailToggler;
332 }
333
334 public void setVarDetailToggler(String varDetailToggler) {
335 _varDetailToggler = varDetailToggler;
336 }
337
338 public void setNewspaperColumns(String newspaperColumns) {
339 this._newspaperColumns = newspaperColumns;
340 }
341
342 public void setNewspaperOrientation(String newspaperOrientation) {
343 this._newspaperOrientation = newspaperOrientation;
344 }
345
346 public String getBodyStyle() {
347 return _bodyStyle;
348 }
349
350 public void setBodyStyle(String bodyStyle) {
351 _bodyStyle = bodyStyle;
352 }
353
354 public String getBodyStyleClass() {
355 return _bodyStyleClass;
356 }
357
358 public void setBodyStyleClass(String bodyStyleClass) {
359 _bodyStyleClass = bodyStyleClass;
360 }
361
362 public String getEmbedded()
363 {
364 return _embedded;
365 }
366
367 public void setEmbedded(String embedded)
368 {
369 this._embedded = embedded;
370 }
371
372 public String getDetailStampExpandedDefault()
373 {
374 return _detailStampExpandedDefault;
375 }
376
377 public void setDetailStampExpandedDefault(String detailStampExpandedDefault)
378 {
379 this._detailStampExpandedDefault = detailStampExpandedDefault;
380 }
381
382 public String getDetailStampLocation()
383 {
384 return _detailStampLocation;
385 }
386
387 public void setDetailStampLocation(String detailStampLocation)
388 {
389 this._detailStampLocation = detailStampLocation;
390 }
391 }