View Javadoc

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.column;
20  
21  import javax.faces.component.UIColumn;
22  
23  /**
24   * A tag that extend h:column to provide HTML passthrough attributes. 
25   * Tag t:column can be used instead of h:column in a t:datatable. 
26   * It provides HTML passthrough attributes for header (th), footer 
27   * (td) and row cells (td). Unless otherwise specified, all 
28   * attributes accept static values or EL expressions.
29   * 
30   * @JSFComponent
31   *   name = "t:column"
32   *   class = "org.apache.myfaces.custom.column.HtmlSimpleColumn"
33   *   tagClass = "org.apache.myfaces.custom.column.HtmlColumnTag"
34   * @since 1.1.7
35   * @author Mathias Broekelmann (latest modification by $Author: lu4242 $)
36   * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (Wed, 03 Sep 2008) $
37   */
38  public abstract class AbstractHtmlSimpleColumn extends UIColumn implements HtmlColumn
39  {
40      public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlColumn";
41  
42      
43      public boolean isGroupByValueSet()
44      {
45          return getGroupByValue() != null;
46      }
47      
48      /**
49       * This attribute tells the datatable to group by data in this column
50       * 
51       * @JSFProperty
52       *   defaultValue = "false"
53       */
54      public abstract boolean isGroupBy();
55  
56  
57      /**
58       *  Optional - Allows you configure where to get the value to 
59       *  check for the group change condition. Default: all children 
60       *  of the column cell will be checked
61       * 
62       * @JSFProperty
63       */
64      public abstract Object getGroupByValue();
65  
66      /**
67       * This attribute tells the datatable to make this column the 
68       * default sorted, when sortable=true
69       * 
70       * @JSFProperty
71       *   defaultValue = "false"
72       */
73      public abstract boolean isDefaultSorted();
74  
75      /**
76       * This attribute makes this column automaticaly sortable 
77       * by a row object's property
78       * 
79       * @JSFProperty
80       *   defaultValue = "false"
81       */
82      public abstract boolean isSortable();
83  
84      /**
85       *  This attribute tells row object's property by which 
86       *  sorting will be performed on this column
87       * 
88       * @JSFProperty
89       */    
90      public abstract String getSortPropertyName();
91  
92  }