com.taggercat.template.tags
Class OneLineTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.taggercat.template.tags.OneLineTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class OneLineTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
This tag unfolds the body content into a single output line.
This tag allows you to break long lines onto multiple lines for better
programmer readability.
When the template is processed, the multi-line statements are nicely
wrapped onto one line in the output.
- See Also:
- Serialized Form
-

| 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 |
|
Method Summary |
int |
doAfterBody()
Default processing for a body |
int |
doEndTag()
Process the end tag. |
void |
setDelimitEmpty(boolean delimitEmpty)
Sets the delimitEmpty attribute. |
void |
setDelimiter(java.lang.String delimiter)
Sets the delimiter to use between lines of the body content. |
void |
setTrim(boolean trim)
Sets the trim attribute. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, doStartTag, getBodyContent, getPreviousOut, release, 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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
OneLineTag
public OneLineTag()
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Process the end tag. This method will be called on all Tag objects. All
instance state associated with this instance must be reset.
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException - Description of Exception
- Returns:
- Description of the Returned Value
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- Default processing for a body
- Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- Returns:
- SKIP_BODY
- See Also:
IterationTag.doAfterBody()
setDelimiter
public void setDelimiter(java.lang.String delimiter)
- Sets the delimiter to use between lines of the body content.
- Parameters:
delimiter - the delimiter
to use a tab character, set the delimiter attribute using: delimiter='<%="\t"%>'
setTrim
public void setTrim(boolean trim)
- Sets the trim attribute.
If set true, then the line is trimmed before concatenation.
- Parameters:
trim - default is true
setDelimitEmpty
public void setDelimitEmpty(boolean delimitEmpty)
- Sets the delimitEmpty attribute.
If set true, then empty lines result in a delimiter string being included in the
output for empty lines.
Otherwise, empty lines will not be included in the resulting output.
- Parameters:
delimitEmpty - the new delimitEmpty state