The Spring Framework

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

java.lang.Object
  extended by javax.servlet.jsp.tagext.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
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag, TryCatchFinally
Direct Known Subclasses:
AbstractHtmlElementBodyTag, AbstractHtmlInputElementTag, FormTag, LabelTag

public abstract class AbstractHtmlElementTag
extends AbstractDataBoundFormElementTag

Base class for databinding-aware JSP tags that render HTML element. Provides a set of properties corresponding to the set of HTML attributes that are common across elements.

Since:
2.0
Author:
Rob Harrop
See Also:
Serialized Form

Field Summary
static String CLASS_ATTRIBUTE
          The name of the 'class' attribute.
static String DIR_ATTRIBUTE
          The name of the 'dir' attribute.
static String LANG_ATTRIBUTE
          The name of the 'lang' attribute.
static String ONCLICK_ATTRIBUTE
          The name of the 'onclick' attribute.
static String ONDBLCLICK_ATTRIBUTE
          The name of the 'ondblclick' attribute.
static String ONKEYDOWN_ATTRIBUTE
          The name of the 'onkeydown' attribute.
static String ONKEYPRESS_ATTRIBUTE
          The name of the 'onkeypress' attribute.
static String ONKEYUP_ATTRIBUTE
          The name of the 'onkeyup' attribute.
static String ONMOUSEDOWN_ATTRIBUTE
          The name of the 'onmousedown' attribute.
static String ONMOUSEMOVE_ATTRIBUTE
          The name of the 'onmousemove' attribute.
static String ONMOUSEOUT_ATTRIBUTE
          The name of the 'onmouseout' attribute.
static String ONMOUSEOVER_ATTRIBUTE
          The name of the 'onmouseover' attribute.
static String ONMOUSEUP_ATTRIBUTE
          The name of the 'onmouseup' attribute.
static String STYLE_ATTRIBUTE
          The name of the 'style' attribute.
static String TABINDEX_ATTRIBUTE
          The name of the 'tabindex' attribute.
static String TITLE_ATTRIBUTE
          The name of the 'title' attribute.
 
Fields inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
ID_ATTRIBUTE
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
AbstractHtmlElementTag()
           
 
Method Summary
protected  String getCssClass()
          Gets the value of the 'class' attribute.
protected  String getCssErrorClass()
          The CSS class to use when the field bound to a particular tag has errors.
protected  String getCssStyle()
          Gets the value of the 'style' attribute.
protected  String getDir()
          Gets the value of the 'dir' attribute.
protected  String getLang()
          Gets the value of the 'lang' attribute.
protected  String getOnclick()
          Gets the value of the 'onclick' attribute.
protected  String getOndblclick()
          Gets the value of the 'ondblclick' attribute.
protected  String getOnkeydown()
          Gets the value of the 'onkeydown' attribute.
protected  String getOnkeypress()
          Gets the value of the 'onkeypress' attribute.
protected  String getOnkeyup()
          Gets the value of the 'onkeyup' attribute.
protected  String getOnmousedown()
          Gets the value of the 'onmousedown' attribute.
protected  String getOnmousemove()
          Gets the value of the 'onmousemove' attribute.
protected  String getOnmouseout()
          Gets the value of the 'onmouseout' attribute.
protected  String getOnmouseover()
          Gets the value of the 'onmouseover' attribute.
protected  String getOnmouseup()
          Gets the value of the 'onmouseup' attribute.
protected  String getTabindex()
          Gets the value of the 'tabindex' attribute.
protected  String getTitle()
          Gets the value of the 'title' attribute.
protected  String resolveCssClass()
          Gets the appropriate CSS class to use based on the state of the current BindStatus object.
 void setCssClass(String cssClass)
          Sets the value of the 'class' attribute.
 void setCssErrorClass(String cssErrorClass)
          The CSS class to use when the field bound to a particular tag has errors.
 void setCssStyle(String cssStyle)
          Sets the value of the 'style' attribute.
 void setDir(String dir)
          Sets the value of the 'dir' attribute.
 void setLang(String lang)
          Sets the value of the 'lang' attribute.
 void setOnclick(String onclick)
          Sets the value of the 'onclick' attribute.
 void setOndblclick(String ondblclick)
          Sets the value of the 'ondblclick' attribute.
 void setOnkeydown(String onkeydown)
          Sets the value of the 'onkeydown' attribute.
 void setOnkeypress(String onkeypress)
          Sets the value of the 'onkeypress' attribute.
 void setOnkeyup(String onkeyup)
          Sets the value of the 'onkeyup' attribute.
 void setOnmousedown(String onmousedown)
          Sets the value of the 'onmousedown' attribute.
 void setOnmousemove(String onmousemove)
          Sets the value of the 'onmousemove' attribute.
 void setOnmouseout(String onmouseout)
          Sets the value of the 'onmouseout' attribute.
 void setOnmouseover(String onmouseover)
          Sets the value of the 'onmouseover' attribute.
 void setOnmouseup(String onmouseup)
          Sets the value of the 'onmouseup' attribute.
 void setTabindex(String tabindex)
          Sets the value of the 'tabindex' attribute.
 void setTitle(String title)
          Sets the value of the 'title' attribute.
protected  void writeDefaultAttributes(TagWriter tagWriter)
          Writes the default attributes configured via this base class to the supplied TagWriter.
 
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
autogenerateId, doFinally, getBindStatus, getBoundValue, getId, getName, getNestedPath, getPath, getPropertyEditor, setId, setPath
 
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractFormTag
createTagWriter, doStartTagInternal, evaluate, getDisplayString, getDisplayString, 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 javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_ATTRIBUTE

public static final String CLASS_ATTRIBUTE
The name of the 'class' attribute.

See Also:
Constant Field Values

STYLE_ATTRIBUTE

public static final String STYLE_ATTRIBUTE
The name of the 'style' attribute.

See Also:
Constant Field Values

LANG_ATTRIBUTE

public static final String LANG_ATTRIBUTE
The name of the 'lang' attribute.

See Also:
Constant Field Values

TITLE_ATTRIBUTE

public static final String TITLE_ATTRIBUTE
The name of the 'title' attribute.

See Also:
Constant Field Values

DIR_ATTRIBUTE

public static final String DIR_ATTRIBUTE
The name of the 'dir' attribute.

See Also:
Constant Field Values

TABINDEX_ATTRIBUTE

public static final String TABINDEX_ATTRIBUTE
The name of the 'tabindex' attribute.

See Also:
Constant Field Values

ONCLICK_ATTRIBUTE

public static final String ONCLICK_ATTRIBUTE
The name of the 'onclick' attribute.

See Also:
Constant Field Values

ONDBLCLICK_ATTRIBUTE

public static final String ONDBLCLICK_ATTRIBUTE
The name of the 'ondblclick' attribute.

See Also:
Constant Field Values

ONMOUSEDOWN_ATTRIBUTE

public static final String ONMOUSEDOWN_ATTRIBUTE
The name of the 'onmousedown' attribute.

See Also:
Constant Field Values

ONMOUSEUP_ATTRIBUTE

public static final String ONMOUSEUP_ATTRIBUTE
The name of the 'onmouseup' attribute.

See Also:
Constant Field Values

ONMOUSEOVER_ATTRIBUTE

public static final String ONMOUSEOVER_ATTRIBUTE
The name of the 'onmouseover' attribute.

See Also:
Constant Field Values

ONMOUSEMOVE_ATTRIBUTE

public static final String ONMOUSEMOVE_ATTRIBUTE
The name of the 'onmousemove' attribute.

See Also:
Constant Field Values

ONMOUSEOUT_ATTRIBUTE

public static final String ONMOUSEOUT_ATTRIBUTE
The name of the 'onmouseout' attribute.

See Also:
Constant Field Values

ONKEYPRESS_ATTRIBUTE

public static final String ONKEYPRESS_ATTRIBUTE
The name of the 'onkeypress' attribute.

See Also:
Constant Field Values

ONKEYUP_ATTRIBUTE

public static final String ONKEYUP_ATTRIBUTE
The name of the 'onkeyup' attribute.

See Also:
Constant Field Values

ONKEYDOWN_ATTRIBUTE

public static final String ONKEYDOWN_ATTRIBUTE
The name of the 'onkeydown' attribute.

See Also:
Constant Field Values
Constructor Detail

AbstractHtmlElementTag

public AbstractHtmlElementTag()
Method Detail

setCssClass

public void setCssClass(String cssClass)
Sets the value of the 'class' attribute. May be a runtime expression.


getCssClass

protected String getCssClass()
Gets the value of the 'class' attribute. May be a runtime expression.


setCssErrorClass

public void setCssErrorClass(String cssErrorClass)
The CSS class to use when the field bound to a particular tag has errors. May be a runtime expression.


getCssErrorClass

protected String getCssErrorClass()
The CSS class to use when the field bound to a particular tag has errors. May be a runtime expression.


setCssStyle

public void setCssStyle(String cssStyle)
Sets the value of the 'style' attribute. May be a runtime expression.


getCssStyle

protected String getCssStyle()
Gets the value of the 'style' attribute. May be a runtime expression.


setLang

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


getLang

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


setTitle

public void setTitle(String title)
Sets the value of the 'title' attribute. May be a runtime expression.


getTitle

protected String getTitle()
Gets the value of the 'title' attribute. May be a runtime expression.


setDir

public void setDir(String dir)
Sets the value of the 'dir' attribute. May be a runtime expression.


getDir

protected String getDir()
Gets the value of the 'dir' attribute. May be a runtime expression.


setTabindex

public void setTabindex(String tabindex)
Sets the value of the 'tabindex' attribute. May be a runtime expression.


getTabindex

protected String getTabindex()
Gets the value of the 'tabindex' attribute. May be a runtime expression.


setOnclick

public void setOnclick(String onclick)
Sets the value of the 'onclick' attribute. May be a runtime expression.


getOnclick

protected String getOnclick()
Gets the value of the 'onclick' attribute. May be a runtime expression.


setOndblclick

public void setOndblclick(String ondblclick)
Sets the value of the 'ondblclick' attribute. May be a runtime expression.


getOndblclick

protected String getOndblclick()
Gets the value of the 'ondblclick' attribute. May be a runtime expression.


setOnmousedown

public void setOnmousedown(String onmousedown)
Sets the value of the 'onmousedown' attribute. May be a runtime expression.


getOnmousedown

protected String getOnmousedown()
Gets the value of the 'onmousedown' attribute. May be a runtime expression.


setOnmouseup

public void setOnmouseup(String onmouseup)
Sets the value of the 'onmouseup' attribute. May be a runtime expression.


getOnmouseup

protected String getOnmouseup()
Gets the value of the 'onmouseup' attribute. May be a runtime expression.


setOnmouseover

public void setOnmouseover(String onmouseover)
Sets the value of the 'onmouseover' attribute. May be a runtime expression.


getOnmouseover

protected String getOnmouseover()
Gets the value of the 'onmouseover' attribute. May be a runtime expression.


setOnmousemove

public void setOnmousemove(String onmousemove)
Sets the value of the 'onmousemove' attribute. May be a runtime expression.


getOnmousemove

protected String getOnmousemove()
Gets the value of the 'onmousemove' attribute. May be a runtime expression.


setOnmouseout

public void setOnmouseout(String onmouseout)
Sets the value of the 'onmouseout' attribute. May be a runtime expression.


getOnmouseout

protected String getOnmouseout()
Gets the value of the 'onmouseout' attribute. May be a runtime expression.


setOnkeypress

public void setOnkeypress(String onkeypress)
Sets the value of the 'onkeypress' attribute. May be a runtime expression.


getOnkeypress

protected String getOnkeypress()
Gets the value of the 'onkeypress' attribute. May be a runtime expression.


setOnkeyup

public void setOnkeyup(String onkeyup)
Sets the value of the 'onkeyup' attribute. May be a runtime expression.


getOnkeyup

protected String getOnkeyup()
Gets the value of the 'onkeyup' attribute. May be a runtime expression.


setOnkeydown

public void setOnkeydown(String onkeydown)
Sets the value of the 'onkeydown' attribute. May be a runtime expression.


getOnkeydown

protected String getOnkeydown()
Gets the value of the 'onkeydown' attribute. May be a runtime expression.


writeDefaultAttributes

protected void writeDefaultAttributes(TagWriter tagWriter)
                               throws JspException
Writes the default attributes configured via this base class to the supplied TagWriter. Subclasses should call this when they want the base attribute set to be written to the output.

Overrides:
writeDefaultAttributes in class AbstractDataBoundFormElementTag
Parameters:
tagWriter - the TagWriter to which any attributes are to be written
Throws:
JspException

resolveCssClass

protected String resolveCssClass()
                          throws JspException
Gets the appropriate CSS class to use based on the state of the current BindStatus object.

Throws:
JspException

The Spring Framework

Copyright © 2002-2006 The Spring Framework.