|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.mmbase.bridge.jsp.taglib.ContextReferrerTag
public abstract class ContextReferrerTag
If you want to have attributes which obtain the value from a parameter or other context variable, or if you want to be able to refer to other tags, then your tag can extend from this one.
ContextTag,
Serialized Form| Field Summary | |
|---|---|
protected Attribute |
contextId
|
static int |
EVAL_BODY
EVAL_BODY is EVAL_BODY_INCLUDE or EVAL_BODY_BUFFERED. |
protected WriterHelper |
helper
The helper member is only used by 'Writer' extensions. |
protected Attribute |
id
|
protected ContextTag |
pageContextTag
|
protected Attribute |
referid
|
protected Attribute |
writerid
Which writer to use. |
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
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 | |
|---|---|
ContextReferrerTag()
|
|
| Method Summary | ||
|---|---|---|
String |
appendMoreParameters(String connector,
String amp,
StringBuffer buf)
Deprecated. |
|
void |
doCatch(Throwable e)
|
|
int |
doEndTag()
|
|
void |
doFinally()
|
|
void |
fillStandardParameters(Parameters p)
Fill standard parameters like request, response, language and locale |
|
javax.servlet.jsp.tagext.Tag |
findLoopOrQuery(String tagId,
boolean exception)
Find loop or query tag using an id |
|
protected
|
findParentTag(Class<C> clazz,
String id)
Finds a parent tag by class and id. |
|
|
findParentTag(Class<C> clazz,
String tagId,
boolean exception)
Finds a parent tag by class and id. |
|
Writer |
findWriter()
Find the parent writer tag. |
|
Writer |
findWriter(boolean th)
Find the parent writer tag. |
|
Attribute |
getAttribute(String attribute)
|
|
Attribute |
getAttribute(String attribute,
boolean interpretEmptyAsAbsent)
|
|
protected Boolean |
getAttributeBoolean(String b)
Like getAttributeValue but converts the result to a Boolean, and throws an exception if this cannot be done. |
|
protected Integer |
getAttributeInteger(String i)
Like getAttributeValue but converts the result to an Integer, and throws an exception if this cannot be done. |
|
protected Integer |
getAttributeInteger(String i,
int def)
|
|
String |
getAttributeValue(String attribute)
Deprecated. Call getAttribute in the set-method and 'toString(tag)' when using it. This is better for performance and makes sure the impl. works in all servlet containers. |
|
ContentTag |
getContentTag()
Returns the content-tag in which this context-referrer is in, or a default (compatible with MMBase 1.6) if there is none. |
|
ContextProvider |
getContextProvider()
Finds the parent context provider. |
|
ContextTag |
getContextTag()
Finds the parent context tag. |
|
protected Block |
getCurrentBlock()
|
|
Locale |
getDefaultLocale()
Get the default locale which is set in mmbase. |
|
protected Object |
getEscapedValue(Object value)
Returns the escaped value associated with this tag, but only if the escape attribute was set explicitly (so not when only inherited from content-tag). |
|
FormTag |
getFormTag(boolean excpetion,
Attribute form)
Get the surrounding form tag |
|
String |
getId()
|
|
Locale |
getLocale()
Get the locale which is defined by surrounding tags or the cloud |
|
Locale |
getLocaleFromContext()
Get the locale which is defined by surrounding tags or the cloud |
|
Object |
getObject(String key)
Gets an object from the Context. |
|
Object |
getObjectConditional(String key)
Support '[key]?', which returns the object with name [key] if it is present, or simply null otherwise. |
|
javax.servlet.jsp.PageContext |
getPageContext()
Just exposes the (otherwise protected) pageContext member. |
|
protected ContextTag |
getPageContextTag()
Returns the ContextTag first on the page |
|
protected Query |
getQuery(Attribute container)
Implements a getQuery for QueryContainerReferrers |
|
protected String |
getReferid()
|
|
protected String |
getString(String key)
Gets an object from the Context, and returns it as a String. |
|
protected static String |
getTaglibVersion()
|
|
static javax.servlet.jsp.PageContext |
getThreadPageContext()
Returns the pageContext which is stored on a trhead local for this request |
|
TimeZone |
getTimeZone()
Get the timezone from the context or the timezone set in mmbase |
|
Object |
getWriterValue()
|
|
void |
haveBody()
|
|
void |
release()
Release all allocated resources. |
|
void |
setContext(String c)
Refer to a specific context. |
|
void |
setEscape(String e)
|
|
void |
setId(String i)
|
|
void |
setJspvar(String j)
|
|
void |
setListdelimiter(String l)
Set list delimiter |
|
void |
setPageContext(javax.servlet.jsp.PageContext pc)
|
|
(package private) void |
setPageContextOnly(javax.servlet.jsp.PageContext pc)
|
|
void |
setReferid(String r)
ContextReferrers normally can have the attribute 'referid'. |
|
void |
setVartype(String t)
|
|
void |
setWrite(String w)
|
|
void |
setWriter(String w)
Sets the writer attribute. |
|
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getParent, getValue, getValues, removeValue, 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 |
| Field Detail |
|---|
public static int EVAL_BODY
protected ContextTag pageContextTag
protected Attribute contextId
protected Attribute referid
protected Attribute id
protected Attribute writerid
protected final WriterHelper helper
| Constructor Detail |
|---|
public ContextReferrerTag()
| Method Detail |
|---|
protected static String getTaglibVersion()
void setPageContextOnly(javax.servlet.jsp.PageContext pc)
public static javax.servlet.jsp.PageContext getThreadPageContext()
public javax.servlet.jsp.PageContext getPageContext()
protected ContextTag getPageContextTag()
public void setPageContext(javax.servlet.jsp.PageContext pc)
setPageContext in interface javax.servlet.jsp.tagext.TagsetPageContext in class javax.servlet.jsp.tagext.TagSupport
public void setReferid(String r)
throws javax.servlet.jsp.JspTagException
r - referid value
javax.servlet.jsp.JspTagException - when parsing of attributes failspublic void setId(String i)
setId in class javax.servlet.jsp.tagext.TagSupportpublic String getId()
getId in class javax.servlet.jsp.tagext.TagSupport
protected String getReferid()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public Writer findWriter()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public Writer findWriter(boolean th)
throws javax.servlet.jsp.JspTagException
th - if it has to throw an exception if the parent can not be found (default: yes).
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public void setWriter(String w)
throws javax.servlet.jsp.JspTagException
w - unparsed attribute
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public int doEndTag()
throws javax.servlet.jsp.JspTagException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspTagExceptionpublic void doFinally()
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally
public void doCatch(Throwable e)
throws Throwable
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinallyThrowablepublic void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class javax.servlet.jsp.tagext.BodyTagSupport
public void setContext(String c)
throws javax.servlet.jsp.JspTagException
c - name of specific context
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public String getAttributeValue(String attribute)
throws javax.servlet.jsp.JspTagException
attribute - name of attribute
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public Attribute getAttribute(String attribute)
throws javax.servlet.jsp.JspTagException
attribute - unparsed attribute
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public Attribute getAttribute(String attribute,
boolean interpretEmptyAsAbsent)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
protected Boolean getAttributeBoolean(String b)
throws javax.servlet.jsp.JspTagException
b - unparsed attribute
javax.servlet.jsp.JspTagException - when parsing of attributes fails
protected Integer getAttributeInteger(String i)
throws javax.servlet.jsp.JspTagException
i - unparsed attribute
javax.servlet.jsp.JspTagException - when parsing of attributes fails
protected Integer getAttributeInteger(String i,
int def)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public <C> C findParentTag(Class<C> clazz,
String tagId,
boolean exception)
throws javax.servlet.jsp.JspTagException
C - type of the tag classclazz - the class of the Tag to find.tagId - the id of the Tag to find.exception - if it has to throw an exception if the parent can not be found (default: yes).
javax.servlet.jsp.JspTagException - when the parent tag is not found
public javax.servlet.jsp.tagext.Tag findLoopOrQuery(String tagId,
boolean exception)
throws javax.servlet.jsp.JspTagException
tagId - the id of the Tag to find.exception - if it has to throw an exception if the parent can not be found (default: yes).
javax.servlet.jsp.JspTagException - when parent tag is not found
protected final <C> C findParentTag(Class<C> clazz,
String id)
throws javax.servlet.jsp.JspTagException
C - type of the tag classclazz - the class of the Tag to find.id - the id of the Tag to find.
javax.servlet.jsp.JspTagException - when parent tag is not found
public ContextProvider getContextProvider()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when context provider is not found
public ContextTag getContextTag()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when context provider is not found
public Object getObject(String key)
throws javax.servlet.jsp.JspTagException
key - key the object is stored under
javax.servlet.jsp.JspTagException - when context provider is not found
public Object getObjectConditional(String key)
throws javax.servlet.jsp.JspTagException
getObject(String).
key - key the object is stored under
javax.servlet.jsp.JspTagException - when context provider is not found
protected String getString(String key)
throws javax.servlet.jsp.JspTagException
key - key the string is stored under
javax.servlet.jsp.JspTagException - when context provider is not found
public ContentTag getContentTag()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parent tag is not found
public Locale getLocale()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parent tag is not found
public Locale getLocaleFromContext()
throws javax.servlet.jsp.JspTagException
null
javax.servlet.jsp.JspTagException - when parent tag is not foundpublic Locale getDefaultLocale()
public TimeZone getTimeZone()
public void fillStandardParameters(Parameters p)
throws javax.servlet.jsp.JspTagException
p - the parameters
javax.servlet.jsp.JspTagException - when parent tag is not found
protected Block getCurrentBlock()
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public void setVartype(String t)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public final void setListdelimiter(String l)
throws javax.servlet.jsp.JspTagException
l - delimiter
javax.servlet.jsp.JspTagException - when parsing of attributes failspublic void setJspvar(String j)
public final void setWrite(String w)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public final void setEscape(String e)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic final Object getWriterValue()
public final void haveBody()
protected Object getEscapedValue(Object value)
throws javax.servlet.jsp.JspTagException
value - initial value
javax.servlet.jsp.JspTagException - when parsing of attributes fails
public FormTag getFormTag(boolean excpetion,
Attribute form)
throws javax.servlet.jsp.JspTagException
excpetion - throw exception when form tag not foundform - name of form
javax.servlet.jsp.JspTagException - when parsing of attributes fails
protected final Query getQuery(Attribute container)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public String appendMoreParameters(String connector,
String amp,
StringBuffer buf)
throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||