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