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  
20  package org.apache.myfaces.tobago.renderkit.html;
21  
22  /**
23   * Custom data attributes.
24   * These attributes may transport data to DOM which are not standardized.
25   * The format is "data-tobago-*" which is conform to HTML 5, but also works in older browsers.
26   */
27  public final class DataAttributes {
28  
29    /**
30     * The index of the column of a sheet. This index means the position of the rendered column. It can differ, if there
31     * are tc:column with rendered=false.
32     */
33    public static final String COLUMNINDEX = "data-tobago-columnindex";
34  
35    /**
36     * Custom command attribute. Is used to mark different client side JavaScript buttons.
37     * Should only contain the command name as a keyword, for security reasons.
38     */
39    public static final String COMMAND = "data-tobago-command";
40  
41    /**
42     * The list of commands attached to an element.
43     */
44    public static final String COMMANDS = "data-tobago-commands";
45  
46    /**
47     * Reference to the corresponding date input field. Used for date picker popups.
48     */
49    public static final String DATEINPUTID = "data-tobago-dateinputid";
50  
51    /**
52     * Marker for the OK-button of the date picker popup.
53     */
54    public static final String DATEPICKEROK = "data-tobago-datepickerok";
55  
56    /**
57     * Holds the day of a calendar control.
58     */
59    public static final String DAY = "data-tobago-day";
60  
61    /**
62     * Custom disabled attribute. Use for element, that don't have the disabled attribute.
63     */
64    public static final String DISABLED = "data-tobago-disabled";
65  
66    /**
67     * Custom form attribute. Used to show the virtual form of the component.
68     */
69    public static final String DEFAULT = "data-tobago-default";
70  
71    public static final String DELAY = "data-tobago-delay";
72  
73    public static final String FOR = "data-tobago-for";
74  
75    /**
76     * Holds the id of the first row in a sheet.
77     */
78    public static final String FIRST = "data-tobago-first";
79  
80    /**
81     * Holds the first day of a week of a calendar control.
82     */
83    public static final String FIRSTDAYOFWEEK = "data-tobago-firstdayofweek";
84  
85    /**
86     * Defines a maximum value.
87     */
88    public static final String MAX = "data-tobago-max";
89  
90    /**
91     * Holds the month of a calendar control.
92     */
93    public static final String MONTH = "data-tobago-month";
94  
95    /**
96     * Holds the names of the months of a calendar control.
97     */
98    public static final String MONTHNAMES = "data-tobago-monthnames";
99  
100   public static final String PARTIALLY = "data-tobago-partially";
101 
102   /**
103    * Custom attribute to describe a pattern, e. g. for an date input field.
104    */
105   public static final String PATTERN = "data-tobago-pattern";
106 
107   /**
108    * Custom reload attribute. Used to reload a panel.
109    */
110   public static final String RELOAD = "data-tobago-reload";
111 
112   public static final String ROWACTION = "data-tobago-rowaction";
113 
114   public static final String SELECTIONMODE = "data-tobago-selectionmode";
115 
116   /**
117    * The selectable attribute e. g. for trees.
118    */
119   public static final String SELECTABLE = "data-tobago-selectable";
120 
121   /**
122    * Reference to a sheet.
123    */
124   public static final String SHEETID = "data-tobago-sheetid";
125 
126   /**
127    * Alternate to the src attribute, to implement a hover effect.
128    */
129   public static final String SRCHOVER = "data-tobago-srchover";
130 
131   /**
132    * Alternate to the src attribute, to implement a hover effect.
133    */
134   public static final String SRCDEFAULT = "data-tobago-srcdefault";
135 
136   /**
137    * Alternate to the src attribute, icon open and close.
138    */
139   public static final String SRCCLOSE = "data-tobago-srcclose";
140 
141   /**
142    * Alternate to the src attribute, icon open and close.
143    */
144   public static final String SRCOPEN = "data-tobago-srcopen";
145 
146   /**
147    * A way to transport style data in JSON format to the browser. With CSP the normal style attribute isn't allowed.
148    */
149   public static final String STYLE = "data-tobago-style";
150 
151   /**
152    * Custom suggest attribute. Used for input suggest.
153    */
154   public static final String SUGGEST = "data-tobago-suggest";
155 
156   public static final String SUGGEST_DELAY = "data-tobago-suggest-delay";
157 
158   public static final String SUGGEST_MIN_CHARS = "data-tobago-suggest-min-chars";
159 
160   public static final String TRANSITION = "data-tobago-transition";
161 
162   /**
163    * Id of the parent node in a tree node.
164    */
165   public static final String TREEPARENT = "data-tobago-treeparent";
166 
167   /**
168    * Defines the unit, e. g. to differ between hours, minutes and seconds in a time control.
169    */
170   public static final String UNIT = "data-tobago-unit";
171 
172   /**
173    * Holds the year of a calendar control.
174    */
175   public static final String YEAR = "data-tobago-year";
176 
177 }