Class AbstractHtmlInputElementTag

All Implemented Interfaces:
DynamicAttributes, IterationTag, JspTag, Tag, TryCatchFinally, Serializable, EditorAwareTag
Direct Known Subclasses:
AbstractCheckedElementTag, InputTag, SelectTag, TextareaTag

public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
Base class for databinding-aware JSP tags that render HTML form input element.

Provides a set of properties corresponding to the set of HTML attributes that are common across form input elements.

Since:
2.0
Author:
Rob Harrop, Rick Evans, Juergen Hoeller
See Also:
  • Field Details

    • ONFOCUS_ATTRIBUTE

      public static final String ONFOCUS_ATTRIBUTE
      The name of the 'onfocus' attribute.
      See Also:
    • ONBLUR_ATTRIBUTE

      public static final String ONBLUR_ATTRIBUTE
      The name of the 'onblur' attribute.
      See Also:
    • ONCHANGE_ATTRIBUTE

      public static final String ONCHANGE_ATTRIBUTE
      The name of the 'onchange' attribute.
      See Also:
    • ACCESSKEY_ATTRIBUTE

      public static final String ACCESSKEY_ATTRIBUTE
      The name of the 'accesskey' attribute.
      See Also:
    • DISABLED_ATTRIBUTE

      public static final String DISABLED_ATTRIBUTE
      The name of the 'disabled' attribute.
      See Also:
    • READONLY_ATTRIBUTE

      public static final String READONLY_ATTRIBUTE
      The name of the 'readonly' attribute.
      See Also:
  • Constructor Details

    • AbstractHtmlInputElementTag

      public AbstractHtmlInputElementTag()
  • Method Details

    • setOnfocus

      public void setOnfocus(String onfocus)
      Set the value of the 'onfocus' attribute. May be a runtime expression.
    • getOnfocus

      @Nullable protected String getOnfocus()
      Get the value of the 'onfocus' attribute.
    • setOnblur

      public void setOnblur(String onblur)
      Set the value of the 'onblur' attribute. May be a runtime expression.
    • getOnblur

      @Nullable protected String getOnblur()
      Get the value of the 'onblur' attribute.
    • setOnchange

      public void setOnchange(String onchange)
      Set the value of the 'onchange' attribute. May be a runtime expression.
    • getOnchange

      @Nullable protected String getOnchange()
      Get the value of the 'onchange' attribute.
    • setAccesskey

      public void setAccesskey(String accesskey)
      Set the value of the 'accesskey' attribute. May be a runtime expression.
    • getAccesskey

      @Nullable protected String getAccesskey()
      Get the value of the 'accesskey' attribute.
    • setDisabled

      public void setDisabled(boolean disabled)
      Set the value of the 'disabled' attribute.
    • isDisabled

      protected boolean isDisabled()
      Get the value of the 'disabled' attribute.
    • setReadonly

      public void setReadonly(boolean readonly)
      Sets the value of the 'readonly' attribute.
    • isReadonly

      protected boolean isReadonly()
      Gets the value of the 'readonly' attribute.
    • writeOptionalAttributes

      protected void writeOptionalAttributes(TagWriter tagWriter) throws JspException
      Adds input-specific optional attributes as defined by this base class.
      Overrides:
      writeOptionalAttributes in class AbstractHtmlElementTag
      Throws:
      JspException