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.shared.renderkit.html;
20  
21  import org.apache.myfaces.shared.util.ArrayUtils;
22  
23  
24  /**
25   * Constant declarations for HTML rendering.
26   * @author Manfred Geiler
27   * @author Anton Koinov
28   * @version $Revision: 1187701 $ $Date: 2011-10-22 07:21:54 -0500 (Sat, 22 Oct 2011) $
29   */
30  public interface HTML
31  {
32      // Deprecated attributes
33      @Deprecated String DATAFLD_ATTR = "datafld";
34      @Deprecated String DATASRC_ATTR = "datasrc";
35      @Deprecated String DATAFORMATAS_ATTR = "dataformatas";
36  
37      // Common attributes
38      String ALIGN_ATTR = "align";
39      String BORDER_ATTR = "border";
40      String WIDTH_ATTR = "width";
41      String READONLY_ATTR = "readonly";
42      String FILE_ATTR = "file";
43      String ACCEPT_ATTR = "accept";
44  
45      // Common event handler attributes
46      String ONCLICK_ATTR     = "onclick";
47      String ONDBLCLICK_ATTR  = "ondblclick";
48      String ONMOUSEDOWN_ATTR = "onmousedown";
49      String ONMOUSEUP_ATTR   = "onmouseup";
50      String ONMOUSEOVER_ATTR = "onmouseover";
51      String ONMOUSEMOVE_ATTR = "onmousemove";
52      String ONMOUSEOUT_ATTR  = "onmouseout";
53      String ONKEYPRESS_ATTR  = "onkeypress";
54      String ONKEYDOWN_ATTR   = "onkeydown";
55      String ONKEYUP_ATTR     = "onkeyup";
56      String ONFOCUS_ATTR = "onfocus";
57      String ONBLUR_ATTR = "onblur";
58      String[] EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK =
59      {
60          ONDBLCLICK_ATTR,
61          ONMOUSEDOWN_ATTR,
62          ONMOUSEUP_ATTR,
63          ONMOUSEOVER_ATTR,
64          ONMOUSEMOVE_ATTR,
65          ONMOUSEOUT_ATTR,
66          ONKEYPRESS_ATTR,
67          ONKEYDOWN_ATTR,
68          ONKEYUP_ATTR
69      };
70      String[] EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT =
71      {
72          ONDBLCLICK_ATTR,
73          ONMOUSEDOWN_ATTR,
74          ONMOUSEUP_ATTR,
75          ONMOUSEMOVE_ATTR,
76          ONKEYPRESS_ATTR,
77          ONKEYDOWN_ATTR,
78          ONKEYUP_ATTR,
79          ONCLICK_ATTR
80      };
81      String[] EVENT_HANDLER_ATTRIBUTES =
82              (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
83                  EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
84                  new String[] {ONCLICK_ATTR});
85  
86      // Input field event handler attributes
87      String ONSELECT_ATTR = "onselect";
88      String ONCHANGE_ATTR = "onchange";
89      String[] COMMON_FIELD_EVENT_ATTRIBUTES =
90      {
91          ONFOCUS_ATTR,
92          ONBLUR_ATTR,
93          ONSELECT_ATTR,
94          ONCHANGE_ATTR
95      };
96  
97      String[] COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS =
98      {
99          ONBLUR_ATTR,
100         ONSELECT_ATTR,
101         ONCHANGE_ATTR
102     };
103     
104     String[] COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE =
105     {
106         ONFOCUS_ATTR,
107         ONBLUR_ATTR
108     };
109 
110     // universal attributes
111     String DIR_ATTR   = "dir";
112     String LANG_ATTR  = "lang";
113     String STYLE_ATTR = "style";
114     String TITLE_ATTR = "title";
115     String STYLE_CLASS_ATTR = "styleClass"; //"class" cannot be used as property name
116      
117     String[] UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE =
118     {
119         DIR_ATTR,
120         LANG_ATTR,
121         TITLE_ATTR,
122 
123         //NOTE: if changed, please verify universal attributes in HtmlMessageRenderer !
124     };
125     String[] UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE_AND_TITLE =
126     {
127         DIR_ATTR,
128         LANG_ATTR,
129     };
130     String[] UNIVERSAL_ATTRIBUTES =
131             (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
132                 UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE,
133                 new String[] {STYLE_ATTR, STYLE_CLASS_ATTR});
134 
135     //universal, but not the same property-name -
136     //styleClass attribute is rendered as such
137     String CLASS_ATTR = "class";
138 
139     // common form field attributes
140     String ACCESSKEY_ATTR   = "accesskey";
141     String TABINDEX_ATTR    = "tabindex";
142     String DISABLED_ATTR = "disabled";
143     String[] COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED =
144     {
145         ACCESSKEY_ATTR,
146         TABINDEX_ATTR
147     };
148     String[] COMMON_FIELD_ATTRIBUTES =
149         (String[]) ArrayUtils.concat(
150             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
151             new String[] {DISABLED_ATTR});
152 
153     // Common Attributes
154     String[] COMMON_PASSTROUGH_ATTRIBUTES =
155         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
156             EVENT_HANDLER_ATTRIBUTES,
157             UNIVERSAL_ATTRIBUTES);
158     String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE =
159         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
160             EVENT_HANDLER_ATTRIBUTES,
161             UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE);
162     String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK =
163         (String[]) ArrayUtils.concat(
164             EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
165             UNIVERSAL_ATTRIBUTES);
166     String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK_WITHOUT_STYLE =
167         (String[]) ArrayUtils.concat(
168             EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
169             UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE);
170     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED =
171         (String[]) ArrayUtils.concat(
172             COMMON_PASSTROUGH_ATTRIBUTES,
173             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
174             COMMON_FIELD_EVENT_ATTRIBUTES);
175     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE =
176         (String[]) ArrayUtils.concat(
177             COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE,
178             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
179             COMMON_FIELD_EVENT_ATTRIBUTES);
180     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS =
181         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
182             COMMON_PASSTROUGH_ATTRIBUTES,
183             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
184             COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS);
185     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS_AND_ONCLICK =
186         (String[]) ArrayUtils.concat(
187             COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK,
188             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
189             COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS);
190     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONCLICK =
191         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
192             COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK,
193             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
194             COMMON_FIELD_EVENT_ATTRIBUTES);
195     String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT =
196         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
197             EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT,
198             UNIVERSAL_ATTRIBUTES);
199     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
200         (String[]) ArrayUtils.concat(
201             UNIVERSAL_ATTRIBUTES,
202             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED);
203     String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS =
204         (String[]) ArrayUtils.concat(
205             UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE,
206             COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED);
207     
208     // <a>
209     String TARGET_ATTR = "target";  //used by <a> and <form>
210     String CHARSET_ATTR     = "charset";
211     String COORDS_ATTR      = "coords";
212     String HREF_ATTR    = "href";
213     String HREFLANG_ATTR    = "hreflang";
214     String REL_ATTR         = "rel";
215     String REV_ATTR         = "rev";
216     String SHAPE_ATTR       = "shape";
217     String TYPE_ATTR        = "type";
218     String[] ANCHOR_ATTRIBUTES =
219     {
220         ACCESSKEY_ATTR,
221         CHARSET_ATTR,
222         COORDS_ATTR,
223         HREFLANG_ATTR,
224         REL_ATTR,
225         REV_ATTR,
226         SHAPE_ATTR,
227         TABINDEX_ATTR,
228         TARGET_ATTR,
229         TYPE_ATTR
230     };
231     String[] ANCHOR_PASSTHROUGH_ATTRIBUTES =
232         (String[]) ArrayUtils.concat(
233             ANCHOR_ATTRIBUTES,
234             COMMON_PASSTROUGH_ATTRIBUTES,
235             COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE);
236     String[] ANCHOR_PASSTHROUGH_ATTRIBUTES_WITHOUT_STYLE =
237         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
238             ANCHOR_ATTRIBUTES,
239             COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE,
240             COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE);
241     String[] ANCHOR_PASSTHROUGH_ATTRIBUTES_WITHOUT_ONCLICK_WITHOUT_STYLE =
242         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
243             ANCHOR_ATTRIBUTES,
244             COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK_WITHOUT_STYLE,
245             COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE);
246     String[] ANCHOR_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
247         (String[]) ArrayUtils.concat(
248             ANCHOR_ATTRIBUTES,
249             UNIVERSAL_ATTRIBUTES);
250     String[] ANCHOR_PASSTHROUGH_ATTRIBUTES_WITHOUT_STYLE_AND_EVENTS =
251         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
252             ANCHOR_ATTRIBUTES,
253             UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE);
254 
255     // <form>
256     String ACCEPT_CHARSET_ATTR = "accept-charset";
257     String ENCTYPE_ATTR = "enctype";
258     String ONRESET_ATTR = "onreset";
259     String ONSUMBIT_ATTR = "onsubmit";
260     String[] FORM_ATTRIBUTES =
261     {
262         ACCEPT_ATTR,
263         ACCEPT_CHARSET_ATTR,
264         ENCTYPE_ATTR,
265         ONRESET_ATTR,
266         ONSUMBIT_ATTR,
267         TARGET_ATTR,
268     };
269     String[] FORM_PASSTHROUGH_ATTRIBUTES =
270         (String[]) ArrayUtils.concat(
271             FORM_ATTRIBUTES,
272             COMMON_PASSTROUGH_ATTRIBUTES);
273     String[] FORM_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
274         (String[]) ArrayUtils.concat(
275             FORM_ATTRIBUTES,
276             UNIVERSAL_ATTRIBUTES);
277     // <img>
278     String SRC_ATTR = "src";
279     String ALT_ATTR = "alt";
280     String HEIGHT_ATTR = "height";
281     String HSPACE_ATTR = "hspace";
282     String ISMAP_ATTR = "ismap";
283     String LONGDESC_ATTR = "longdesc";
284     String USEMAP_ATTR = "usemap";
285     String VSPACE_ATTR = "vspace";
286 
287     String[] IMG_ATTRIBUTES =
288     {
289         ALIGN_ATTR,
290         ALT_ATTR,
291         BORDER_ATTR,
292         HEIGHT_ATTR,
293         HSPACE_ATTR,
294         ISMAP_ATTR,
295         LONGDESC_ATTR,
296         USEMAP_ATTR,
297         VSPACE_ATTR,
298         WIDTH_ATTR
299     };
300     String[] IMG_PASSTHROUGH_ATTRIBUTES =
301         (String[]) ArrayUtils.concat(
302            IMG_ATTRIBUTES,
303            COMMON_PASSTROUGH_ATTRIBUTES);
304     String[] IMG_PASSTHROUGH_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT =
305         (String[]) ArrayUtils.concat(
306            IMG_ATTRIBUTES,
307            COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT);
308     String[] IMG_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
309         (String[]) ArrayUtils.concat(
310            IMG_ATTRIBUTES,
311            UNIVERSAL_ATTRIBUTES);
312     // <input>
313     String SIZE_ATTR = "size";
314     String AUTOCOMPLETE_ATTR = "autocomplete";
315     String CHECKED_ATTR = "checked";
316     String MAXLENGTH_ATTR = "maxlength";
317 
318     String[] INPUT_ATTRIBUTES = {
319         ALIGN_ATTR,
320         ALT_ATTR,
321         CHECKED_ATTR,
322         MAXLENGTH_ATTR,
323         READONLY_ATTR,
324         SIZE_ATTR
325     };
326     String[] INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED =
327         (String[]) ArrayUtils.concat(
328                 INPUT_ATTRIBUTES,
329                 COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED);
330     String[] INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE =
331         (String[]) ArrayUtils.concat(
332                 INPUT_ATTRIBUTES,
333                 COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE);
334 
335     String[] INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS_AND_ONCLICK =
336         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
337                 INPUT_ATTRIBUTES,
338                 COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS_AND_ONCLICK);
339 
340     String[] INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
341         (String[]) ArrayUtils.concat(
342                 INPUT_ATTRIBUTES,
343                 COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
344     
345     String[] INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS =
346         (String[]) ArrayUtils.concat(
347                 INPUT_ATTRIBUTES,
348                 COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS);
349 
350     //values for input-type attribute
351     String INPUT_TYPE_SUBMIT = "submit";
352     String INPUT_TYPE_IMAGE = "image";
353     String INPUT_TYPE_HIDDEN = "hidden";
354     String INPUT_TYPE_CHECKBOX = "checkbox";
355     String INPUT_TYPE_PASSWORD = "password";
356     String INPUT_TYPE_TEXT = "text";
357     String INPUT_TYPE_RADIO = "radio";
358     String INPUT_TYPE_BUTTON = "button";
359 
360     // <button>
361     String[] BUTTON_ATTRIBUTES =
362     {
363         ALIGN_ATTR,
364         ALT_ATTR,
365     };
366     String[] BUTTON_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED =
367         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
368             BUTTON_ATTRIBUTES,
369             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED);
370     String[] BUTTON_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONCLICK =
371         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
372             BUTTON_ATTRIBUTES,
373             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONCLICK);
374     String[] BUTTON_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
375         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
376             BUTTON_ATTRIBUTES,
377             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
378 
379     // <iframe>
380     String FRAMEBORDER_ATTR = "frameborder";
381     String SCROLLING_ATTR = "scrolling";
382 
383     // <label>
384     String FOR_ATTR = "for";
385     String[] LABEL_ATTRIBUTES =
386     {
387         ACCESSKEY_ATTR,
388         ONBLUR_ATTR,
389         ONFOCUS_ATTR
390         //FOR_ATTR is no pass through !
391     };
392     String[] LABEL_ATTRIBUTES_WITHOUT_EVENTS =
393     {
394         ACCESSKEY_ATTR
395     };
396     String[] LABEL_PASSTHROUGH_ATTRIBUTES =
397         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
398             LABEL_ATTRIBUTES,
399             COMMON_PASSTROUGH_ATTRIBUTES);
400     String[] LABEL_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
401         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
402             LABEL_ATTRIBUTES_WITHOUT_EVENTS,
403             UNIVERSAL_ATTRIBUTES);
404 
405     // <select>
406     String MULTIPLE_ATTR = "multiple";
407 
408     String[] SELECT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED = 
409             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED;
410     String[] SELECT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS = 
411         COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS;
412 
413     // <table>
414     String BGCOLOR_ATTR = "bgcolor";
415     String CELLPADDING_ATTR = "cellpadding";
416     String CELLSPACING_ATTR = "cellspacing";
417     String FRAME_ATTR = "frame";
418     String RULES_ATTR = "rules";
419     String SUMMARY_ATTR = "summary";
420     String[] TABLE_ATTRIBUTES = {
421         ALIGN_ATTR,
422         BGCOLOR_ATTR,
423         BORDER_ATTR,
424         CELLPADDING_ATTR,
425         CELLSPACING_ATTR,
426         FRAME_ATTR,
427         RULES_ATTR,
428         SUMMARY_ATTR,
429         WIDTH_ATTR
430     };
431     String[] TABLE_PASSTHROUGH_ATTRIBUTES =
432         (String[]) ArrayUtils.concat(
433             TABLE_ATTRIBUTES,
434             COMMON_PASSTROUGH_ATTRIBUTES);
435     String[] TABLE_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
436         (String[]) ArrayUtils.concat(
437             TABLE_ATTRIBUTES,
438             UNIVERSAL_ATTRIBUTES);
439 
440     // <textarea>
441     String COLS_ATTR = "cols";
442     String ROWS_ATTR = "rows";
443     String WRAP_ATTR = "wrap";
444     String[] TEXTAREA_ATTRIBUTES =
445     {
446         COLS_ATTR,
447         READONLY_ATTR,
448         ROWS_ATTR,
449         WRAP_ATTR
450     };
451     String[] TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED =
452         (String[]) ArrayUtils.concat(
453             TEXTAREA_ATTRIBUTES,
454             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED);
455     String[] TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
456         (String[]) ArrayUtils.concat(
457             TEXTAREA_ATTRIBUTES,
458             COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
459 
460     // <input type=file>
461     String[] INPUT_FILE_UPLOAD_ATTRIBUTES =
462     {
463         ACCEPT_ATTR
464     };
465     String[] INPUT_FILE_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED =
466         (String[]) ArrayUtils.concat(
467             INPUT_FILE_UPLOAD_ATTRIBUTES,
468             INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
469     String[] INPUT_FILE_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
470         (String[]) ArrayUtils.concat(
471             INPUT_FILE_UPLOAD_ATTRIBUTES,
472             INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
473 
474     /*
475     String[] MESSAGE_PASSTHROUGH_ATTRIBUTES =
476         (String[]) ArrayUtils.concat(
477             new String[] {DIR_ATTR, LANG_ATTR, TITLE_ATTR, STYLE_ATTR, STYLE_CLASS_ATTR},
478             EVENT_HANDLER_ATTRIBUTES);
479             */
480 
481     String[] MESSAGE_PASSTHROUGH_ATTRIBUTES_WITHOUT_TITLE_STYLE_AND_STYLE_CLASS =
482         (String[]) org.apache.myfaces.shared.util.ArrayUtils.concat(
483             new String[] {DIR_ATTR, LANG_ATTR},
484             EVENT_HANDLER_ATTRIBUTES);
485 
486 
487     // selectOne/Many table
488     String[] SELECT_TABLE_PASSTHROUGH_ATTRIBUTES =
489         new String[] {STYLE_ATTR, STYLE_CLASS_ATTR, BORDER_ATTR};
490 
491     String COMPACT_ATTR = "compact";
492     String[] UL_ATTRIBUTES = {
493         COMPACT_ATTR,
494         TYPE_ATTR
495     };
496     String[] UL_PASSTHROUGH_ATTRIBUTES =
497         (String[]) ArrayUtils.concat(
498             UL_ATTRIBUTES,
499             COMMON_PASSTROUGH_ATTRIBUTES);
500     String[] UL_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
501         (String[]) ArrayUtils.concat(
502             UL_ATTRIBUTES,
503             UNIVERSAL_ATTRIBUTES);
504 
505     //body
506     String BODY_ELEM = "body";
507     String BODY_TARGET = BODY_ELEM;
508     
509     String ONLOAD_ATTR = "onload";
510     String ONUNLOAD_ATTR = "onunload";
511     String ALINK_ATTR = "alink";
512     String VLINK_ATTR = "vlink";
513     String LINK_ATTR = "link";
514     String TEXT_ATTR = "text";
515     String BACKGROUND_ATTR = "background";
516 
517     String[] BODY_ATTRIBUTES =
518     {
519         ONLOAD_ATTR,
520         ONUNLOAD_ATTR,
521         ALINK_ATTR,
522         VLINK_ATTR,
523         LINK_ATTR,
524         TEXT_ATTR,
525         BACKGROUND_ATTR,
526         BGCOLOR_ATTR
527     };
528     
529     String[] BODY_ATTRIBUTES_WITHOUT_EVENTS =
530     {
531         ALINK_ATTR,
532         VLINK_ATTR,
533         LINK_ATTR,
534         TEXT_ATTR,
535         BACKGROUND_ATTR,
536         BGCOLOR_ATTR
537     };
538 
539     String[] BODY_PASSTHROUGH_ATTRIBUTES =
540         (String[]) ArrayUtils.concat(
541                 COMMON_PASSTROUGH_ATTRIBUTES,
542                 BODY_ATTRIBUTES);
543     String[] BODY_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS =
544         (String[]) ArrayUtils.concat(
545                 UNIVERSAL_ATTRIBUTES,
546                 BODY_ATTRIBUTES_WITHOUT_EVENTS);
547     //HTML attributes needed for renderding only
548     String ID_ATTR = "id";
549     String NAME_ATTR = "name";
550     String VALUE_ATTR = "value";
551     String METHOD_ATTR = "method";
552     String ACTION_ATTR = "action";
553     String COLSPAN_ATTR = "colspan";
554     String SCOPE_ATTR = "scope";
555     String LABEL_ATTR = "label";
556     String SELECTED_ATTR = "selected";
557     String XMLNS_ATTR = "xmlns";
558 
559     //HTML attributes values
560     String SCOPE_COLGROUP_VALUE = "colgroup";
561     String SCOPE_ROW_VALUE = "row";
562 
563     //HTML element constants
564     String SPAN_ELEM = "span";
565     String DIV_ELEM = "div";
566     String INPUT_ELEM = "input";
567     String BUTTON_ELEM = "button";
568     String SELECT_ELEM = "select";
569     String OPTION_ELEM = "option";
570     String OPTGROUP_ELEM = "optgroup";
571     String TEXTAREA_ELEM = "textarea";
572     String FORM_ELEM = "form";
573     String ANCHOR_ELEM = "a";
574     String H1_ELEM = "h1";
575     String H2_ELEM = "h2";
576     String H3_ELEM = "h3";
577     String H4_ELEM = "h4";
578     String H5_ELEM = "h5";
579     String H6_ELEM = "h6";
580     String IFRAME_ELEM = "iframe";
581     String IMG_ELEM = "img";
582     String LABEL_ELEM = "label";
583     String TABLE_ELEM = "table";
584     String CAPTION_ELEM = "caption";
585     String TR_ELEM = "tr";
586     String TH_ELEM = "th";
587     String TD_ELEM = "td";
588     String TBODY_ELEM = "tbody";
589     String TFOOT_ELEM = "tfoot";
590     String THEAD_ELEM = "thead";
591     String STYLE_ELEM = "style";
592     String SCRIPT_ELEM = "script";
593     String SCRIPT_TYPE_ATTR = "type";
594     String SCRIPT_TYPE_TEXT_JAVASCRIPT = "text/javascript";
595     String STYLE_TYPE_TEXT_CSS = "text/css";
596     String SCRIPT_LANGUAGE_ATTR = "language";
597     String SCRIPT_LANGUAGE_JAVASCRIPT = "JavaScript";
598     String SCRIPT_ELEM_DEFER_ATTR = "defer";
599     String LINK_ELEM = "link";
600     String STYLESHEET_VALUE = "stylesheet";
601     String UL_ELEM = "ul";
602     String OL_ELEM = "ol";
603     String LI_ELEM = "li";
604 
605 
606     //HTML simple element constants
607     String BR_ELEM = "br";
608 
609 
610     //HTML entities
611     String NBSP_ENTITY = "&#160;";
612 
613     String HREF_PATH_SEPARATOR = "/";
614     String HREF_PATH_FROM_PARAM_SEPARATOR = "?";
615     //removed because wrong for XHTML and not used anyway: String HREF_PARAM_SEPARATOR = "&";
616     String HREF_PARAM_NAME_FROM_VALUE_SEPARATOR = "=";
617 
618 }