public abstract class ContextReferrerTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally
ContextTag,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
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.
|
| Constructor and Description |
|---|
ContextReferrerTag() |
| Modifier and Type | Method and Description |
|---|---|
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 <C> C |
findParentTag(Class<C> clazz,
String id)
Finds a parent tag by class and id.
|
<C> C |
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
|
TimerTag |
getTimer() |
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.
|
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValuepublic static int EVAL_BODY
protected ContextTag pageContextTag
protected Attribute contextId
protected Attribute referid
protected Attribute id
protected Attribute writerid
protected final WriterHelper helper
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.TagSupportpublic void setReferid(String r) throws javax.servlet.jsp.JspTagException
r - referid valuejavax.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.TagSupportprotected String getReferid() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic Writer findWriter() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parsing of attributes failspublic 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 failspublic void setWriter(String w) throws javax.servlet.jsp.JspTagException
w - unparsed attributejavax.servlet.jsp.JspTagException - when parsing of attributes failspublic 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.TryCatchFinallypublic 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.BodyTagSupportpublic void setContext(String c) throws javax.servlet.jsp.JspTagException
c - name of specific contextjavax.servlet.jsp.JspTagException - when parsing of attributes failspublic String getAttributeValue(String attribute) throws javax.servlet.jsp.JspTagException
attribute - name of attributejavax.servlet.jsp.JspTagException - when parsing of attributes failspublic Attribute getAttribute(String attribute) throws javax.servlet.jsp.JspTagException
attribute - unparsed attributejavax.servlet.jsp.JspTagException - when parsing of attributes failspublic Attribute getAttribute(String attribute, boolean interpretEmptyAsAbsent) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected Boolean getAttributeBoolean(String b) throws javax.servlet.jsp.JspTagException
b - unparsed attributejavax.servlet.jsp.JspTagException - when parsing of attributes failsprotected Integer getAttributeInteger(String i) throws javax.servlet.jsp.JspTagException
i - unparsed attributejavax.servlet.jsp.JspTagException - when parsing of attributes failsprotected Integer getAttributeInteger(String i, int def) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic <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 foundpublic 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 foundprotected 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 foundpublic ContextProvider getContextProvider() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when context provider is not foundpublic ContextTag getContextTag() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when context provider is not foundpublic Object getObject(String key) throws javax.servlet.jsp.JspTagException
key - key the object is stored underjavax.servlet.jsp.JspTagException - when context provider is not foundpublic Object getObjectConditional(String key) throws javax.servlet.jsp.JspTagException
getObject(String).key - key the object is stored underjavax.servlet.jsp.JspTagException - when context provider is not foundprotected String getString(String key) throws javax.servlet.jsp.JspTagException
key - key the string is stored underjavax.servlet.jsp.JspTagException - when context provider is not foundpublic ContentTag getContentTag() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parent tag is not foundpublic Locale getLocale() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException - when parent tag is not foundpublic Locale getLocaleFromContext() throws javax.servlet.jsp.JspTagException
nulljavax.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 parametersjavax.servlet.jsp.JspTagException - when parent tag is not foundprotected Block getCurrentBlock() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setVartype(String t) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic final void setListdelimiter(String l) throws javax.servlet.jsp.JspTagException
l - delimiterjavax.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.JspTagExceptionpublic 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 valuejavax.servlet.jsp.JspTagException - when parsing of attributes failspublic FormTag getFormTag(boolean excpetion, Attribute form) throws javax.servlet.jsp.JspTagException
excpetion - throw exception when form tag not foundform - name of formjavax.servlet.jsp.JspTagException - when parsing of attributes failsprotected final Query getQuery(Attribute container) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic String appendMoreParameters(String connector, String amp, StringBuffer buf) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic TimerTag getTimer() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}