1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.myfaces.custom.crosstable;
20
21 import org.apache.myfaces.custom.column.HtmlColumn;
22
23
24 /**
25 * The tag allows dynamic columns in a datatable.
26 *
27 * The UIColumns component is used below a t:datatable to create a
28 * dynamic count of columns. It is used like a UIData component
29 * which iterates through a datamodel to create the columns.
30 *
31 * Unless otherwise specified, all attributes accept static values or EL expressions.
32 *
33 * @JSFComponent
34 * name = "t:columns"
35 * class = "org.apache.myfaces.custom.crosstable.HtmlColumns"
36 * tagClass = "org.apache.myfaces.custom.crosstable.HtmlColumnsTag"
37 * implements = "org.apache.myfaces.custom.column.HtmlColumn"
38 * defaultRendererType = ""
39 * @since 1.1.7
40 * @author Mathias Broekelmann (latest modification by $Author: lu4242 $)
41 * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (Wed, 03 Sep 2008) $
42 */
43 public abstract class AbstractHtmlColumns extends UIColumns implements HtmlColumn {
44
45 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlColumns";
46
47 /**
48 * This attribute tells the datatable to group by data in this column
49 *
50 * @JSFProperty
51 * defaultValue = "false"
52 */
53 public abstract boolean isGroupBy();
54
55 /**
56 * Optional - Allows you configure where to get the value to
57 * check for the group change condition. Default: all children
58 * of the column cell will be checked
59 *
60 * @JSFProperty
61 */
62 public abstract Object getGroupByValue();
63
64 /**
65 * This attribute tells the datatable to make this column the
66 * default sorted, when sortable=true
67 *
68 * @JSFProperty
69 * defaultValue = "false"
70 */
71 public abstract boolean isDefaultSorted();
72
73 /**
74 * This attribute makes this column automaticaly sortable
75 * by a row object's property
76 *
77 * @JSFProperty
78 * defaultValue = "false"
79 */
80 public abstract boolean isSortable();
81
82 /**
83 * This attribute tells row object's property by which
84 * sorting will be performed on this column
85 *
86 * @JSFProperty
87 */
88 public abstract String getSortPropertyName();
89
90 // the following are not implemented, but are in the HtmlColumn interface
91 public String getColspan() {return null;}
92 public void setColspan(String colspan) {}
93 public String getHeadercolspan() {return null;}
94 public void setHeadercolspan(String headercolspan) {}
95 public String getFootercolspan() {return null;}
96 public void setFootercolspan(String footercolspan) {}
97
98 public String getColumnId() {
99 return null;
100 }
101
102 public void setColumnId(String columnId) {
103 }
104
105 }