001/*002 * Copyright 2002-2013 the original author or authors.003 *004 * Licensed under the Apache License, Version 2.0 (the "License");005 * you may not use this file except in compliance with the License.006 * You may obtain a copy of the License at007 *008 * https://www.apache.org/licenses/LICENSE-2.0009 *010 * Unless required by applicable law or agreed to in writing, software011 * distributed under the License is distributed on an "AS IS" BASIS,012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.013 * See the License for the specific language governing permissions and014 * limitations under the License.015 */016017package org.springframework.web.servlet.tags.form;018019import javax.servlet.jsp.JspException;020021/**022 * Base class for databinding-aware JSP tags that render HTML form input element.023 *024 * <p>Provides a set of properties corresponding to the set of HTML attributes025 * that are common across form input elements.026 *027 * @author Rob Harrop028 * @author Rick Evans029 * @author Juergen Hoeller030 * @since 2.0031 */032@SuppressWarnings("serial")033public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag {034035 /**036 * The name of the '{@code onfocus}' attribute.037 */038 public static final String ONFOCUS_ATTRIBUTE = "onfocus";039040 /**041 * The name of the '{@code onblur}' attribute.042 */043 public static final String ONBLUR_ATTRIBUTE = "onblur";044045 /**046 * The name of the '{@code onchange}' attribute.047 */048 public static final String ONCHANGE_ATTRIBUTE = "onchange";049050 /**051 * The name of the '{@code accesskey}' attribute.052 */053 public static final String ACCESSKEY_ATTRIBUTE = "accesskey";054055 /**056 * The name of the '{@code disabled}' attribute.057 */058 public static final String DISABLED_ATTRIBUTE = "disabled";059060 /**061 * The name of the '{@code readonly}' attribute.062 */063 public static final String READONLY_ATTRIBUTE = "readonly";064065066 private String onfocus;067068 private String onblur;069070 private String onchange;071072 private String accesskey;073074 private boolean disabled;075076 private boolean readonly;077078079 /**080 * Set the value of the '{@code onfocus}' attribute.081 * May be a runtime expression.082 */083 public void setOnfocus(String onfocus) {