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 javax.faces.component.behavior.ClientBehaviorHolder;
22
23 import org.apache.myfaces.custom.column.HtmlColumn;
24
25
26 /**
27 * The tag allows dynamic columns in a datatable.
28 *
29 * The UIColumns component is used below a t:datatable to create a
30 * dynamic count of columns. It is used like a UIData component
31 * which iterates through a datamodel to create the columns.
32 *
33 * Unless otherwise specified, all attributes accept static values or EL expressions.
34 *
35 * @JSFComponent
36 * name = "t:columns"
37 * class = "org.apache.myfaces.custom.crosstable.HtmlColumns"
38 * tagClass = "org.apache.myfaces.custom.crosstable.HtmlColumnsTag"
39 * implements = "org.apache.myfaces.custom.column.HtmlColumn"
40 * defaultRendererType = ""
41 * @since 1.1.7
42 * @author Mathias Broekelmann (latest modification by $Author: lu4242 $)
43 * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (miƩ, 03 sep 2008) $
44 */
45 public abstract class AbstractHtmlColumns extends UIColumns
46 implements HtmlColumn, ClientBehaviorHolder
47 {
48
49 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlColumns";
50
51 /**
52 * This attribute tells the datatable to group by data in this column
53 *
54 * @JSFProperty
55 * defaultValue = "false"
56 */
57 public abstract boolean isGroupBy();
58
59 /**
60 * Optional - Allows you configure where to get the value to
61 * check for the group change condition. Default: all children
62 * of the column cell will be checked
63 *
64 * @JSFProperty
65 */
66 public abstract Object getGroupByValue();
67
68 /**
69 * This attribute tells the datatable to make this column the
70 * default sorted, when sortable=true
71 *
72 * @JSFProperty
73 * defaultValue = "false"
74 */
75 public abstract boolean isDefaultSorted();
76
77 /**
78 * This attribute makes this column automaticaly sortable
79 * by a row object's property
80 *
81 * @JSFProperty
82 * defaultValue = "false"
83 */
84 public abstract boolean isSortable();
85
86 /**
87 * This attribute tells row object's property by which
88 * sorting will be performed on this column
89 *
90 * @JSFProperty
91 */
92 public abstract String getSortPropertyName();
93
94 // the following are not implemented, but are in the HtmlColumn interface
95 public String getColspan() {return null;}
96 public void setColspan(String colspan) {}
97 public String getHeadercolspan() {return null;}
98 public void setHeadercolspan(String headercolspan) {}
99 public String getFootercolspan() {return null;}
100 public void setFootercolspan(String footercolspan) {}
101
102 public String getColumnId() {
103 return null;
104 }
105
106 public void setColumnId(String columnId) {
107 }
108
109 }