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 COLUMN_INDEX = "data-tobago-column-index";
34  
35    /** @deprecated Since 1.5.11 */
36    @Deprecated
37    public static final String COLUMNINDEX = COLUMN_INDEX;
38  
39    /**
40     * TBD: needed? may replace with VALUE?
41     * Custom command attribute. Is used to mark different client side JavaScript buttons.
42     * Should only contain the command name as a keyword, for security reasons.
43     */
44    public static final String COMMAND = "data-tobago-command";
45  
46    /**
47     * The list of commands attached to an element.
48     */
49    public static final String COMMANDS = "data-tobago-commands";
50  
51    /**
52     * Reference to the corresponding date input field. Used for date picker popups.
53     */
54    public static final String DATE_INPUT_ID = "data-tobago-date-input-id";
55  
56    /** @deprecated Since 1.5.11 */
57    @Deprecated
58    public static final String DATEINPUTID = DATE_INPUT_ID;
59  
60    /**
61     * Marker for the OK-button of the date picker popup.
62     */
63    public static final String DATE_PICKER_OK = "data-tobago-date-picker-ok";
64  
65    /** @deprecated Since 1.5.11 */
66    @Deprecated
67    public static final String DATEPICKEROK = DATE_PICKER_OK;
68  
69    /**
70     * Holds the day of a calendar control.
71     */
72    public static final String DAY = "data-tobago-day";
73  
74    /**
75     * Custom disabled attribute. Use for element, that don't have the disabled attribute.
76     */
77    public static final String DISABLED = "data-tobago-disabled";
78  
79    /**
80     * Custom form attribute. Used to show the virtual form of the component.
81     */
82    public static final String DEFAULT = "data-tobago-default";
83  
84    public static final String DELAY = "data-tobago-delay";
85  
86    public static final String FOR = "data-tobago-for";
87  
88    /**
89     * Holds the id of the first row in a sheet.
90     */
91    public static final String FIRST = "data-tobago-first";
92  
93    /*
94     * Holds the index of the row in a sheet, if the sheed has a rowRendered attribute.
95     */
96    public static final String ROW_INDEX = "data-tobago-row-index";
97  
98    /**
99     * Holds the first day of a week of a calendar control.
100    */
101   public static final String FIRST_DAY_OF_WEEK = "data-tobago-first-day-of-week";
102 
103   /** @deprecated Since 1.5.11 */
104   @Deprecated
105   public static final String FIRSTDAYOFWEEK = FIRST_DAY_OF_WEEK;
106 
107   /**
108    * Defines a maximum value.
109    */
110   public static final String MAX = "data-tobago-max";
111 
112   /**
113    * Holds the month of a calendar control.
114    */
115   public static final String MONTH = "data-tobago-month";
116 
117   /**
118    * Holds the names of the months of a calendar control.
119    */
120   public static final String MONTH_NAMES = "data-tobago-month-names";
121 
122   /** @deprecated Since 1.5.11 */
123   @Deprecated
124   public static final String MONTHNAMES = MONTH_NAMES;
125 
126   public static final String PARTIALLY = "data-tobago-partially";
127 
128   public static final String PARTIAL_ACTION = "data-tobago-partial-action";
129 
130   /**
131    * Custom attribute to describe a pattern, e. g. for an date input field.
132    */
133   public static final String PATTERN = "data-tobago-pattern";
134 
135   /**
136    * Custom reload attribute. Used to reload a panel.
137    */
138   public static final String RELOAD = "data-tobago-reload";
139 
140   public static final String ROW_ACTION = "data-tobago-row-action";
141 
142   /** @deprecated Since 1.5.11 */
143   @Deprecated
144   public static final String ROWACTION = ROW_ACTION;
145 
146   public static final String SELECTION_MODE = "data-tobago-selection-mode";
147 
148   /** @deprecated Since 1.5.11 */
149   @Deprecated
150   public static final String SELECTIONMODE = SELECTION_MODE;
151 
152   /**
153    * The selectable attribute e. g. for trees.
154    */
155   public static final String SELECTABLE = "data-tobago-selectable";
156 
157   /**
158    * Reference to a sheet.
159    */
160   public static final String SHEET_ID = "data-tobago-sheet-id";
161 
162   /** @deprecated Since 1.5.11 */
163   @Deprecated
164   public static final String SHEETID = SHEET_ID;
165 
166   /**
167    * Alternate to the src attribute, to implement a hover effect.
168    */
169   public static final String SRC_HOVER = "data-tobago-src-hover";
170 
171   /** @deprecated Since 1.5.11 */
172   @Deprecated
173   public static final String SRCHOVER = SRC_HOVER;
174 
175   /**
176    * Alternate to the src attribute, to implement a hover effect.
177    */
178   public static final String SRC_DEFAULT = "data-tobago-src-default";
179 
180   /** @deprecated Since 1.5.11 */
181   @Deprecated
182   public static final String SRCDEFAULT = SRC_DEFAULT;
183 
184   /**
185    * Alternate to the src attribute, icon open and close.
186    */
187   public static final String SRC_CLOSE = "data-tobago-src-close";
188 
189   /** @deprecated Since 1.5.11 */
190   @Deprecated
191   public static final String SRCCLOSE = SRC_CLOSE;
192 
193   /**
194    * Alternate to the src attribute, icon open and close.
195    */
196   public static final String SRC_OPEN = "data-tobago-src-open";
197 
198   /** @deprecated Since 1.5.11 */
199   @Deprecated
200   public static final String SRCOPEN = SRC_OPEN;
201 
202   /**
203    * A way to transport style data in JSON format to the browser. With CSP the normal style attribute isn't allowed.
204    */
205   public static final String STYLE = "data-tobago-style";
206 
207   /**
208    * Custom suggest attribute. Used for input suggest.
209    * @deprecated Since Tobago 2.0.0. No longer needed.
210    */
211   @Deprecated
212   public static final String SUGGEST = "data-tobago-suggest";
213 
214   public static final String SUGGEST_DELAY = "data-tobago-suggest-delay";
215 
216   public static final String SUGGEST_MAX_ITEMS = "data-tobago-suggest-max-items";
217 
218   public static final String SUGGEST_MIN_CHARS = "data-tobago-suggest-min-chars";
219 
220   public static final String SUGGEST_TOTAL_COUNT = "data-tobago-suggest-total-count";
221 
222   public static final String SUGGEST_UPDATE = "data-tobago-suggest-update";
223 
224   public static final String TRANSITION = "data-tobago-transition";
225 
226   /**
227    * Id of the parent node in a tree node.
228    */
229   public static final String TREE_PARENT = "data-tobago-tree-parent";
230 
231   /** @deprecated Since 1.5.11 */
232   @Deprecated
233   public static final String TREEPARENT = TREE_PARENT;
234 
235   /**
236    * Defines the unit, e. g. to differ between hours, minutes and seconds in a time control.
237    */
238   public static final String UNIT = "data-tobago-unit";
239 
240   /**
241    * Holds the value (for tags, that don't have a value in HTML).
242    */
243   public static final String VALUE = "data-tobago-value";
244 
245   /**
246    * Holds the year of a calendar control.
247    */
248   public static final String YEAR = "data-tobago-year";
249 
250 }