net.sourceforge.stripes.tag
Class InputTextAreaTag

java.lang.Object
  extended by net.sourceforge.stripes.tag.StripesTagSupport
      extended by net.sourceforge.stripes.tag.HtmlTagSupport
          extended by net.sourceforge.stripes.tag.InputTagSupport
              extended by net.sourceforge.stripes.tag.InputTextAreaTag
All Implemented Interfaces:
BodyTag, DynamicAttributes, IterationTag, JspTag, Tag, TryCatchFinally

public class InputTextAreaTag
extends InputTagSupport
implements BodyTag

Tag that generates HTML form fields of type <textarea name="foo"> ... </textarea>, which can dynamically re-populate their value. Textareas may have only a single value, whose default may be set using either the body of the textarea, or using the value="" attribute of the tag. At runtime the contents of the textarea are determined by looking for the first non-null value in the following list:

Author:
Tim Fennell

Field Summary
 
Fields inherited from class net.sourceforge.stripes.tag.InputTagSupport
errorRenderer, fieldErrors
 
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport
pageContext, parentTag
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
InputTextAreaTag()
           
 
Method Summary
 int doAfterBody()
          Does nothing.
 int doEndInputTag()
          Determines which source is applicable for the contents of the textarea and then writes out the textarea tag including the body.
 void doInitBody()
          Does nothing.
 int doStartInputTag()
          Does nothing.
 String getCols()
          Gets the HTML attribute of the same name.
 String getRows()
          Gets the HTML attribute of the same name.
 Object getValue()
          Returns the value set using setValue().
 void setCols(String cols)
          Sets the HTML attribute of the same name.
 void setRows(String rows)
          Sets the HTML attribute of the same name.
 void setValue(Object value)
          Sets the default value of the textarea (if no body is present).
 
Methods inherited from class net.sourceforge.stripes.tag.InputTagSupport
doCatch, doEndTag, doFinally, doStartTag, format, format, getActionBean, getDisabled, getFieldErrors, getFormatPattern, getFormatType, getLocalizedFieldName, getLocalizedFieldName, getName, getOverrideValueOrValues, getParentFormTag, getReadonly, getSingleOverrideValue, getSize, getValidationMetadata, getValueOnPage, hasErrors, isItemSelected, loadErrors, makeFocused, registerWithParentForm, setDisabled, setFocus, setFormatPattern, setFormatType, setName, setReadonly, setSize
 
Methods inherited from class net.sourceforge.stripes.tag.HtmlTagSupport
evaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, release, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTag
 
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.BodyTag
setBodyContent
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

InputTextAreaTag

public InputTextAreaTag()
Method Detail

setValue

public void setValue(Object value)
Sets the default value of the textarea (if no body is present).


getValue

public Object getValue()
Returns the value set using setValue().


setCols

public void setCols(String cols)
Sets the HTML attribute of the same name.


getCols

public String getCols()
Gets the HTML attribute of the same name.


setRows

public void setRows(String rows)
Sets the HTML attribute of the same name.


getRows

public String getRows()
Gets the HTML attribute of the same name.


doStartInputTag

public int doStartInputTag()
                    throws JspException
Does nothing.

Specified by:
doStartInputTag in class InputTagSupport
Returns:
EVAL_BODY_BUFFERED in all cases.
Throws:
JspException

doInitBody

public void doInitBody()
                throws JspException
Does nothing.

Specified by:
doInitBody in interface BodyTag
Throws:
JspException

doAfterBody

public int doAfterBody()
                throws JspException
Does nothing.

Specified by:
doAfterBody in interface IterationTag
Returns:
SKIP_BODY in all cases.
Throws:
JspException

doEndInputTag

public int doEndInputTag()
                  throws JspException
Determines which source is applicable for the contents of the textarea and then writes out the textarea tag including the body.

Specified by:
doEndInputTag in class InputTagSupport
Returns:
EVAL_PAGE in all cases.
Throws:
JspException - if the enclosing form tag cannot be found, or output cannot be written.


? Copyright 2005-2006, Stripes Development Team.