org.springframework.web.servlet.tags.form
Class AbstractHtmlInputElementTag

java.lang.Object
  extended by TagSupport
      extended by org.springframework.web.servlet.tags.RequestContextAwareTag
          extended by org.springframework.web.servlet.tags.HtmlEscapingAwareTag
              extended by org.springframework.web.servlet.tags.form.AbstractFormTag
                  extended by org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
                      extended by org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
                          extended by org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
All Implemented Interfaces:
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

Field Summary
private  java.lang.String accesskey
           
static java.lang.String ACCESSKEY_ATTRIBUTE
          The name of the 'accesskey' attribute.
private  java.lang.String disabled
           
static java.lang.String DISABLED_ATTRIBUTE
          The name of the 'disabled' attribute.
private  java.lang.String onblur
           
static java.lang.String ONBLUR_ATTRIBUTE
          The name of the 'onblur' attribute.
private  java.lang.String onchange
           
static java.lang.String ONCHANGE_ATTRIBUTE
          The name of the 'onchange' attribute.
private  java.lang.String onfocus
           
static java.lang.String ONFOCUS_ATTRIBUTE
          The name of the 'onfocus' attribute.
private  java.lang.String readonly
           
static java.lang.String READONLY_ATTRIBUTE
          The name of the 'readonly' attribute.
 
Fields inherited from class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
CLASS_ATTRIBUTE, DIR_ATTRIBUTE, LANG_ATTRIBUTE, ONCLICK_ATTRIBUTE, ONDBLCLICK_ATTRIBUTE, ONKEYDOWN_ATTRIBUTE, ONKEYPRESS_ATTRIBUTE, ONKEYUP_ATTRIBUTE, ONMOUSEDOWN_ATTRIBUTE, ONMOUSEMOVE_ATTRIBUTE, ONMOUSEOUT_ATTRIBUTE, ONMOUSEOVER_ATTRIBUTE, ONMOUSEUP_ATTRIBUTE, STYLE_ATTRIBUTE, TABINDEX_ATTRIBUTE, TITLE_ATTRIBUTE
 
Fields inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
COMMAND_NAME_VARIABLE_NAME, NESTED_PATH_VARIABLE_NAME
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
 
Constructor Summary
AbstractHtmlInputElementTag()
           
 
Method Summary
protected  java.lang.String getAccesskey()
          Get the value of the 'accesskey' attribute.
protected  java.lang.String getDisabled()
          Get the value of the 'disabled' attribute.
protected  java.lang.String getOnblur()
          Get the value of the 'onblur' attribute.
protected  java.lang.String getOnchange()
          Get the value of the 'onchange' attribute.
protected  java.lang.String getOnfocus()
          Get the value of the 'onfocus' attribute.
protected  java.lang.String getReadonly()
          Gets the value of the 'readonly' attribute.
protected  boolean isDisabled()
          Is the current HTML tag disabled?
protected  boolean isReadonly()
          Is the current HTML tag readonly?
 void setAccesskey(java.lang.String accesskey)
          Set the value of the 'accesskey' attribute.
 void setDisabled(java.lang.String disabled)
          Set the value of the 'disabled' attribute.
 void setOnblur(java.lang.String onblur)
          Set the value of the 'onblur' attribute.
 void setOnchange(java.lang.String onchange)
          Set the value of the 'onchange' attribute.
 void setOnfocus(java.lang.String onfocus)
          Set the value of the 'onfocus' attribute.
 void setReadonly(java.lang.String readonly)
          Sets the value of the 'readonly' attribute.
protected  void writeOptionalAttributes(TagWriter tagWriter)
          Adds input-specific optional attributes as defined by this base class.
 
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
getCssClass, getCssErrorClass, getCssStyle, getDir, getDynamicAttributes, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getTabindex, getTitle, resolveCssClass, setCssClass, setCssErrorClass, setCssStyle, setDir, setDynamicAttribute, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setTabindex, setTitle, writeDefaultAttributes
 
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
autogenerateId, convertToDisplayString, doFinally, getBindStatus, getBoundValue, getEditor, getId, getName, getNestedPath, getPath, getPropertyEditor, getPropertyPath, resolveId, setId, setPath
 
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractFormTag
createTagWriter, doStartTagInternal, evaluate, evaluateBoolean, getDisplayString, getDisplayString, isDefaultHtmlEscape, writeOptionalAttribute, writeTagContent
 
Methods inherited from class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
isHtmlEscape, setHtmlEscape
 
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doStartTag, getRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONFOCUS_ATTRIBUTE

public static final java.lang.String ONFOCUS_ATTRIBUTE
The name of the 'onfocus' attribute.

See Also:
Constant Field Values

ONBLUR_ATTRIBUTE

public static final java.lang.String ONBLUR_ATTRIBUTE
The name of the 'onblur' attribute.

See Also:
Constant Field Values

ONCHANGE_ATTRIBUTE

public static final java.lang.String ONCHANGE_ATTRIBUTE
The name of the 'onchange' attribute.

See Also:
Constant Field Values

ACCESSKEY_ATTRIBUTE

public static final java.lang.String ACCESSKEY_ATTRIBUTE
The name of the 'accesskey' attribute.

See Also:
Constant Field Values

DISABLED_ATTRIBUTE

public static final java.lang.String DISABLED_ATTRIBUTE
The name of the 'disabled' attribute.

See Also:
Constant Field Values

READONLY_ATTRIBUTE

public static final java.lang.String READONLY_ATTRIBUTE
The name of the 'readonly' attribute.

See Also:
Constant Field Values

onfocus

private java.lang.String onfocus

onblur

private java.lang.String onblur

onchange

private java.lang.String onchange

accesskey

private java.lang.String accesskey

disabled

private java.lang.String disabled

readonly

private java.lang.String readonly
Constructor Detail

AbstractHtmlInputElementTag

public AbstractHtmlInputElementTag()
Method Detail

setOnfocus

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


getOnfocus

protected java.lang.String getOnfocus()
Get the value of the 'onfocus' attribute.


setOnblur

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


getOnblur

protected java.lang.String getOnblur()
Get the value of the 'onblur' attribute.


setOnchange

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


getOnchange

protected java.lang.String getOnchange()
Get the value of the 'onchange' attribute.


setAccesskey

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


getAccesskey

protected java.lang.String getAccesskey()
Get the value of the 'accesskey' attribute.


setDisabled

public void setDisabled(java.lang.String disabled)
Set the value of the 'disabled' attribute. May be a runtime expression.


getDisabled

protected java.lang.String getDisabled()
Get the value of the 'disabled' attribute.


setReadonly

public void setReadonly(java.lang.String readonly)
Sets the value of the 'readonly' attribute. May be a runtime expression.

See Also:
isReadonly()

getReadonly

protected java.lang.String getReadonly()
Gets the value of the 'readonly' attribute. May be a runtime expression.

See Also:
isReadonly()

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

isDisabled

protected boolean isDisabled()
                      throws JspException
Is the current HTML tag disabled?

Throws:
JspException

isReadonly

protected boolean isReadonly()
                      throws JspException
Is the current HTML tag readonly?

Note: some AbstractHtmlInputElementTag subclasses (such a those for checkboxes and radiobuttons) may contain readonly attributes, but are not affected by them since their values don't change (only their status does.)

Throws:
JspException