org.apache.taglibs.string
Class SplitTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.taglibs.string.StringTagSupport
org.apache.taglibs.string.SplitTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
public class SplitTag
- extends StringTagSupport
Splits the provided text into an array, separators specified.
The separator is not included in the returned String array and adjacent separators are treated
as one separator.
- separator
-
Separator string to be used.
- Author:
- Felipe Leme (felipeal at apache dot org)
- See Also:
- Serialized Form
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 |
Method Summary |
java.lang.String |
changeString(java.lang.String text)
Perform a transformation on the passed in String. |
java.lang.Object |
evaluateString(java.lang.String text)
Perform an operation on the passed String. |
void |
initAttributes()
Initialise any properties to default values. |
void |
setSeparator(java.lang.String separator)
Set the separator to be used. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
SplitTag
public SplitTag()
setSeparator
public void setSeparator(java.lang.String separator)
- Set the separator to be used.
- Parameters:
separator
- separator to be used
changeString
public java.lang.String changeString(java.lang.String text)
throws javax.servlet.jsp.JspException
- Description copied from class:
StringTagSupport
- Perform a transformation on the passed in String.
- Specified by:
changeString
in class StringTagSupport
- Parameters:
text
- String to be manipulated
- Returns:
- String result of operation upon passed in String
- Throws:
javax.servlet.jsp.JspException
evaluateString
public java.lang.Object evaluateString(java.lang.String text)
throws javax.servlet.jsp.JspException
- Description copied from class:
StringTagSupport
- Perform an operation on the passed String.
The object returned by this operation (if not null) will be
associated to PageContext attribute represented by this.var.
- Overrides:
evaluateString
in class StringTagSupport
- Parameters:
text
- String to be manipulated
- Returns:
- Object result of operation upon passed String
- Throws:
javax.servlet.jsp.JspException
initAttributes
public void initAttributes()
- Description copied from class:
StringTagSupport
- Initialise any properties to default values.
This method is called upon construction, and
after changeString(String) is called.
This is a default empty implementation.
- Overrides:
initAttributes
in class StringTagSupport
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.