HDIV API 2.0.4

org.hdiv.taglib.html
Class HiddenTagHDIV

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.struts.taglib.html.BaseHandlerTag
              extended by org.apache.struts.taglib.html.BaseInputTag
                  extended by org.apache.struts.taglib.html.BaseFieldTag
                      extended by org.apache.struts.taglib.html.HiddenTag
                          extended by org.hdiv.taglib.html.HiddenTagHDIV
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
ELHiddenTagHDIV, NestedHiddenTagHDIV

public class HiddenTagHDIV
extends org.apache.struts.taglib.html.HiddenTag

Renders an HTML <input> element of type hidden, populated from the specified value or the specified property of the bean associated with our current form. This tag is only valid when nested inside a form tag body.

Author:
Aritz Rabadan, Gorka Vicente
See Also:
HiddenTag, Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.taglib.html.HiddenTag
write
 
Fields inherited from class org.apache.struts.taglib.html.BaseFieldTag
accept, name, redisplay, type
 
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
HiddenTagHDIV()
           
 
Method Summary
 int doStartTag()
          Generate the required input tag, followed by the optional rendered text.
protected  java.lang.String formatValue(java.lang.Object unformat)
          Return the given value as a formatted String.
protected  void prepareAttribute(java.lang.StringBuffer handlers, java.lang.String name, java.lang.Object value)
          Prepares an attribute if the value is not null, appending it to the the given StringBuffer.
protected  java.lang.String prepareName()
          Prepare the name element
protected  void prepareOtherAttributes(java.lang.StringBuffer handlers)
          'Hook' to enable tags to be extended and additional attributes added.
protected  void prepareValue(java.lang.StringBuffer results)
          Render the value element.
protected  java.lang.String renderInputElement()
          Renders a fully formed <input> element.
 
Methods inherited from class org.apache.struts.taglib.html.HiddenTag
getWrite, release, setWrite
 
Methods inherited from class org.apache.struts.taglib.html.BaseFieldTag
getAccept, getName, getRedisplay, setAccept, setName, setRedisplay
 
Methods inherited from class org.apache.struts.taglib.html.BaseInputTag
doEndTag, 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

HiddenTagHDIV

public HiddenTagHDIV()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Generate the required input tag, followed by the optional rendered text. Support for write property since Struts 1.1.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class org.apache.struts.taglib.html.HiddenTag
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred
See Also:
org.hdiv.composer.IDataComposer#compose(String, String, boolean)

renderInputElement

protected java.lang.String renderInputElement()
                                       throws javax.servlet.jsp.JspException
Renders a fully formed <input> element.

Throws:
javax.servlet.jsp.JspException

prepareName

protected java.lang.String prepareName()
                                throws javax.servlet.jsp.JspException
Prepare the name element

Returns:
The element name.
Throws:
javax.servlet.jsp.JspException

prepareValue

protected void prepareValue(java.lang.StringBuffer results)
                     throws javax.servlet.jsp.JspException
Render the value element.

Parameters:
results - The StringBuffer that output will be appended to.
Throws:
javax.servlet.jsp.JspException

formatValue

protected java.lang.String formatValue(java.lang.Object unformat)
                                throws javax.servlet.jsp.JspException
Return the given value as a formatted String. This implementation escapes potentially harmful HTML characters.

Parameters:
unformat - The value to be formatted. null values will be returned as the empty String "".
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

prepareAttribute

protected void prepareAttribute(java.lang.StringBuffer handlers,
                                java.lang.String name,
                                java.lang.Object value)
Prepares an attribute if the value is not null, appending it to the the given StringBuffer.

Parameters:
handlers - The StringBuffer that output will be appended to.

prepareOtherAttributes

protected void prepareOtherAttributes(java.lang.StringBuffer handlers)
'Hook' to enable tags to be extended and additional attributes added.

Parameters:
handlers - The StringBuffer that output will be appended to.

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.