org.mmbase.bridge.jsp.taglib
Class ContextReferrerTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.mmbase.bridge.jsp.taglib.ContextReferrerTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- CloudReferrerTag, CloudTag, ContextTag, ParamTag, PresentTag, RemoveTag, UrlTag, WriteTag
- public abstract class ContextReferrerTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
If you want to have attributes which obtain the value from a
parameter, extend from this.
It also contains a few other 'utily' functions, which can be handy when constructing tags.
- Author:
- Michiel Meeuwissen
- 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_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
|
Method Summary |
protected javax.servlet.jsp.tagext.TagSupport |
findParentTag(java.lang.String classname,
java.lang.String id)
|
protected javax.servlet.jsp.tagext.TagSupport |
findParentTag(java.lang.String classname,
java.lang.String id,
boolean exception)
Finds a parent tag by class and id. |
protected java.lang.String |
getAttributeValue(java.lang.String attribute)
Call this function in your set-attribute function. |
protected ContextTag |
getContextTag()
Finds the parent context tag. |
protected ContextTag |
getContextTag(java.lang.String contextid)
|
protected java.lang.String |
getReferid()
|
protected java.lang.String |
getReferIdValue(java.lang.String attribute)
|
void |
release()
Release all allocated resources. |
void |
setContext(java.lang.String c)
Refer to a specific context. |
void |
setPageContext(javax.servlet.jsp.PageContext pc)
|
void |
setReferid(java.lang.String r)
|
static java.util.Vector |
stringSplitter(java.lang.String string)
|
static java.util.Vector |
stringSplitter(java.lang.String attribute,
java.lang.String delimiter)
Simple util method to split comma separated values
to a vector. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, setParent |
pageContextTag
protected ContextTag pageContextTag
referid
protected java.lang.String referid
ContextReferrerTag
public ContextReferrerTag()
setPageContext
public void setPageContext(javax.servlet.jsp.PageContext pc)
- Overrides:
setPageContext in class javax.servlet.jsp.tagext.TagSupport
setReferid
public void setReferid(java.lang.String r)
throws javax.servlet.jsp.JspTagException
getReferid
protected java.lang.String getReferid()
throws javax.servlet.jsp.JspTagException
release
public void release()
- Release all allocated resources.
- Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport
setContext
public void setContext(java.lang.String c)
- Refer to a specific context.
getReferIdValue
protected java.lang.String getReferIdValue(java.lang.String attribute)
getAttributeValue
protected java.lang.String getAttributeValue(java.lang.String attribute)
throws javax.servlet.jsp.JspTagException
- Call this function in your set-attribute function. It makes it
possible for the user of the taglib to include ids of values stored in
the context.
The method replaces all occurrences of ${x}, where x is a reference to
a attribute value, possibly prefixed with a context name.
findParentTag
protected final javax.servlet.jsp.tagext.TagSupport findParentTag(java.lang.String classname,
java.lang.String id,
boolean exception)
throws javax.servlet.jsp.JspTagException
- Finds a parent tag by class and id.
- Parameters:
classname - the classname of the Tag to find.id - the id of the Tag to find.exception - if it has to throw an exception if the parent can not be found (default: yes).
findParentTag
protected final javax.servlet.jsp.tagext.TagSupport findParentTag(java.lang.String classname,
java.lang.String id)
throws javax.servlet.jsp.JspTagException
getContextTag
protected ContextTag getContextTag()
throws javax.servlet.jsp.JspTagException
- Finds the parent context tag.
getContextTag
protected ContextTag getContextTag(java.lang.String contextid)
throws javax.servlet.jsp.JspTagException
stringSplitter
public static java.util.Vector stringSplitter(java.lang.String attribute,
java.lang.String delimiter)
- Simple util method to split comma separated values
to a vector. Usefull for attributes.
- Parameters:
string - the string to splitdelimiter - - Returns:
- a Vector containing the elements, the elements are also trimed
stringSplitter
public static java.util.Vector stringSplitter(java.lang.String string)
MMBase 2001