com.ivata.mask.web.tag.html
Class TextareaTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.apache.struts.taglib.html.BaseHandlerTag
              extended byorg.apache.struts.taglib.html.BaseInputTag
                  extended byorg.apache.struts.taglib.html.TextareaTag
                      extended bycom.ivata.mask.web.tag.html.TextareaTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class TextareaTag
extends org.apache.struts.taglib.html.TextareaTag

Overrides an HTML <textarea> tag, by overriding the class from Struts .

Tag attributes:

attribute reqd. param. class description
fieldName true java.lang.String The field name is used to default the following attributes of the tag:
  • styleId
  • titleKey
  • valueKey
.
mandatory false boolean Specifies data for this tag must be entered when the form is submitted.
readOnly false boolean Specifies the form elements should be displayed only and cannot be altered.

Note: all the tag attributes from Stuts are also included.

Since:
ivata masks 0.4 (2003-01-15)
Version:
$Revision: 1.3 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.taglib.html.TextareaTag
name
 
Fields inherited from class org.apache.struts.taglib.html.BaseInputTag
cols, maxlength, messages, property, rows, value
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, defaultLocale, indexed, tabindex
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
TextareaTag()
           
 
Method Summary
 int doEndTag()
           Overridden to check whether or not the field is read only, and to apply mandatory field attributes.
 int doStartTag()
           Overridden to provide mandatory/read-only functionality.
 MaskProperties getMaskProperties()
           Stores and maintains ivata op specific mask properties.
 void setFieldName(java.lang.String fieldName)
           >Name of the field to which this label refers.
 void setFormatter(HTMLFormatter formatterParam)
           Set a formatter to use if the tag is read-only.
 void setMandatory(boolean mandatory)
           Set whether or not the value this control must be entered.
 void setMaskProperties(MaskProperties maskPropertiesParam)
           Stores and maintains ivata op specific mask properties.
 void setReadOnly(boolean readOnly)
           Specifies whether or not the input values can be altered.
 
Methods inherited from class org.apache.struts.taglib.html.TextareaTag
getName, release, renderData, renderTextareaElement, setName
 
Methods inherited from class org.apache.struts.taglib.html.BaseInputTag
getCols, getMaxlength, getProperty, getRows, getSize, getValue, setCols, setMaxlength, setProperty, setRows, setSize, setValue
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getIndexed, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareKeyEvents, prepareMouseEvents, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setIndexed, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

TextareaTag

public TextareaTag()
Method Detail

setReadOnly

public void setReadOnly(boolean readOnly)

Specifies whether or not the input values can be altered.

Parameters:
readOnly - true if the input of this field can be changed, otherwise false to only display the current value.

setMandatory

public void setMandatory(boolean mandatory)

Set whether or not the value this control must be entered.

Parameters:
mandatory - true if this field must be entered, otherwise false if the field is optional.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Overridden to provide mandatory/read-only functionality.

Returns:
value returned by superclass method, or SKIP_BODY if this tag is read-only.
Throws:
javax.servlet.jsp.JspException - if either valueKey or titleKey have not been set, or as thrown by superclass method.

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException

Overridden to check whether or not the field is read only, and to apply mandatory field attributes.

Returns:
EVAL_PAGE since we always want to evaluate the page after this tag.
Throws:
javax.servlet.jsp.JspException - if there is an error wrting to out.print()

setFormatter

public void setFormatter(HTMLFormatter formatterParam)

Set a formatter to use if the tag is read-only.

Parameters:
formatterParam - new value of formatter.

getMaskProperties

public MaskProperties getMaskProperties()

Stores and maintains ivata op specific mask properties.

Returns:
the current value of maskProperties.

setMaskProperties

public void setMaskProperties(MaskProperties maskPropertiesParam)

Stores and maintains ivata op specific mask properties.

Parameters:
maskPropertiesParam - the new value of maskProperties.

setFieldName

public void setFieldName(java.lang.String fieldName)

>Name of the field to which this label refers. This is used in conjunction with the resourceFieldPath to retrieve the correct message resources path.

Parameters:
fieldName - the new value of fieldName.


Copyright © 2001-2005 ivata limited. All Rights Reserved.