Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.commons.util.renderkit;
import org.apache.myfaces.commons.util.ArrayUtils;
/**
* Constant declarations for HTML rendering.
* @author Manfred Geiler
* @author Anton Koinov
* @version $Revision: 938289 $ $Date: 2010-04-26 20:35:24 -0500 (Lun, 26 Abr 2010) $
*/
public final class HTML
{
// Common attributes
public static final String ALIGN_ATTR = "align";
public static final String BORDER_ATTR = "border";
public static final String WIDTH_ATTR = "width";
public static final String READONLY_ATTR = "readonly";
public static final String FILE_ATTR = "file";
public static final String ACCEPT_ATTR = "accept";
// Common event handler attributes
public static final String ONCLICK_ATTR = "onclick";
public static final String ONDBLCLICK_ATTR = "ondblclick";
public static final String ONMOUSEDOWN_ATTR = "onmousedown";
public static final String ONMOUSEUP_ATTR = "onmouseup";
public static final String ONMOUSEOVER_ATTR = "onmouseover";
public static final String ONMOUSEMOVE_ATTR = "onmousemove";
public static final String ONMOUSEOUT_ATTR = "onmouseout";
public static final String ONKEYPRESS_ATTR = "onkeypress";
public static final String ONKEYDOWN_ATTR = "onkeydown";
public static final String ONKEYUP_ATTR = "onkeyup";
public static final String ONFOCUS_ATTR = "onfocus";
public static final String ONBLUR_ATTR = "onblur";
public static final String[] EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK =
{
ONDBLCLICK_ATTR,
ONMOUSEDOWN_ATTR,
ONMOUSEUP_ATTR,
ONMOUSEOVER_ATTR,
ONMOUSEMOVE_ATTR,
ONMOUSEOUT_ATTR,
ONKEYPRESS_ATTR,
ONKEYDOWN_ATTR,
ONKEYUP_ATTR
};
public static final String[] EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT =
{
ONDBLCLICK_ATTR,
ONMOUSEDOWN_ATTR,
ONMOUSEUP_ATTR,
ONMOUSEMOVE_ATTR,
ONKEYPRESS_ATTR,
ONKEYDOWN_ATTR,
ONKEYUP_ATTR,
ONCLICK_ATTR
};
public static final String[] EVENT_HANDLER_ATTRIBUTES =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
new String[] {ONCLICK_ATTR});
// Input field event handler attributes
public static final String ONSELECT_ATTR = "onselect";
public static final String ONCHANGE_ATTR = "onchange";
public static final String[] COMMON_FIELD_EVENT_ATTRIBUTES =
{
ONFOCUS_ATTR,
ONBLUR_ATTR,
ONSELECT_ATTR,
ONCHANGE_ATTR
};
public static final String[] COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS =
{
ONBLUR_ATTR,
ONSELECT_ATTR,
ONCHANGE_ATTR
};
public static final String[] COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE =
{
ONFOCUS_ATTR,
ONBLUR_ATTR
};
// universal attributes
public static final String DIR_ATTR = "dir";
public static final String LANG_ATTR = "lang";
public static final String STYLE_ATTR = "style";
public static final String TITLE_ATTR = "title";
public static final String STYLE_CLASS_ATTR = "styleClass"; //"class" cannot be used as property name
public static final String[] UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE =
{
DIR_ATTR,
LANG_ATTR,
TITLE_ATTR,
//NOTE: if changed, please verify universal attributes in HtmlMessageRenderer !
};
public static final String[] UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE_AND_TITLE =
{
DIR_ATTR,
LANG_ATTR,
};
public static final String[] UNIVERSAL_ATTRIBUTES =
(String[]) ArrayUtils.concat(
UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE,
new String[] {STYLE_ATTR, STYLE_CLASS_ATTR});
//universal, but not the same property-name -
//styleClass attribute is rendered as such
public static final String CLASS_ATTR = "class";
// common form field attributes
public static final String ACCESSKEY_ATTR = "accesskey";
public static final String TABINDEX_ATTR = "tabindex";
public static final String DISABLED_ATTR = "disabled";
public static final String[] COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED =
{
ACCESSKEY_ATTR,
TABINDEX_ATTR
};
public static final String[] COMMON_FIELD_ATTRIBUTES =
(String[]) ArrayUtils.concat(
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
new String[] {DISABLED_ATTR});
// Common Attributes
public static final String[] COMMON_PASSTROUGH_ATTRIBUTES =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES,
UNIVERSAL_ATTRIBUTES);
public static final String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES,
UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE);
public static final String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
UNIVERSAL_ATTRIBUTES);
public static final String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK_WITHOUT_STYLE =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK,
UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED =
(String[]) ArrayUtils.concat(
COMMON_PASSTROUGH_ATTRIBUTES,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
COMMON_FIELD_EVENT_ATTRIBUTES);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE =
(String[]) ArrayUtils.concat(
COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_STYLE,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
COMMON_FIELD_EVENT_ATTRIBUTES);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS =
(String[]) ArrayUtils.concat(
COMMON_PASSTROUGH_ATTRIBUTES,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS_AND_ONCLICK =
(String[]) ArrayUtils.concat(
COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONFOCUS);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONCLICK =
(String[]) ArrayUtils.concat(
COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONCLICK,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED,
COMMON_FIELD_EVENT_ATTRIBUTES);
public static final String[] COMMON_PASSTROUGH_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT =
(String[]) ArrayUtils.concat(
EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONMOUSEOVER_AND_ONMOUSEOUT,
UNIVERSAL_ATTRIBUTES);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS =
(String[]) ArrayUtils.concat(
UNIVERSAL_ATTRIBUTES,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED);
public static final String[] COMMON_FIELD_PASSTROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS =
(String[]) ArrayUtils.concat(
UNIVERSAL_ATTRIBUTES_WITHOUT_STYLE,
COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED);
//
public static final String TARGET_ATTR = "target"; //used by and