|
||||||||||
| 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 |
|
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. |
|
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 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(PageContext pc)
|
|
(package private) void |
setPageContextOnly(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(PageContext pc)
public static PageContext getThreadPageContext()
public PageContext getPageContext()
protected ContextTag getPageContextTag()
public void setPageContext(PageContext pc)
setPageContext in interface TagsetPageContext in class TagSupport
public void setReferid(String r)
throws JspTagException
r - referid value
JspTagException - when parsing of attributes failspublic void setId(String i)
setId in class TagSupportpublic String getId()
getId in class TagSupport
protected String getReferid()
throws JspTagException
JspTagException
public Writer findWriter()
throws JspTagException
JspTagException - when parsing of attributes fails
public Writer findWriter(boolean th)
throws JspTagException
th - if it has to throw an exception if the parent can not be found (default: yes).
JspTagException - when parsing of attributes fails
public void setWriter(String w)
throws JspTagException
w - unparsed attribute
JspTagException - when parsing of attributes fails
public int doEndTag()
throws JspTagException
doEndTag in interface TagdoEndTag in class BodyTagSupportJspTagExceptionpublic void doFinally()
doFinally in interface TryCatchFinally
public void doCatch(Throwable e)
throws Throwable
doCatch in interface TryCatchFinallyThrowablepublic void release()
release in interface Tagrelease in class BodyTagSupport
public void setContext(String c)
throws JspTagException
c - name of specific context
JspTagException - when parsing of attributes fails
public String getAttributeValue(String attribute)
throws JspTagException
attribute - name of attribute
JspTagException - when parsing of attributes fails
public Attribute getAttribute(String attribute)
throws JspTagException
attribute - unparsed attribute
JspTagException - when parsing of attributes fails
public Attribute getAttribute(String attribute,
boolean interpretEmptyAsAbsent)
throws JspTagException
JspTagException
protected Boolean getAttributeBoolean(String b)
throws JspTagException
b - unparsed attribute
JspTagException - when parsing of attributes fails
protected Integer getAttributeInteger(String i)
throws JspTagException
i - unparsed attribute
JspTagException - when parsing of attributes fails
protected Integer getAttributeInteger(String i,
int def)
throws JspTagException
JspTagException
public <C> C findParentTag(Class<C> clazz,
String tagId,
boolean exception)
throws 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).
JspTagException - when the parent tag is not found
public Tag findLoopOrQuery(String tagId,
boolean exception)
throws 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).
JspTagException - when parent tag is not found
protected final <C> C findParentTag(Class<C> clazz,
String id)
throws JspTagException
C - type of the tag classclazz - the class of the Tag to find.id - the id of the Tag to find.
JspTagException - when parent tag is not found
public ContextProvider getContextProvider()
throws JspTagException
JspTagException - when context provider is not found
public ContextTag getContextTag()
throws JspTagException
JspTagException - when context provider is not found
public Object getObject(String key)
throws JspTagException
key - key the object is stored under
JspTagException - when context provider is not found
public Object getObjectConditional(String key)
throws JspTagException
getObject(String).
key - key the object is stored under
JspTagException - when context provider is not found
protected String getString(String key)
throws JspTagException
key - key the string is stored under
JspTagException - when context provider is not found
public ContentTag getContentTag()
throws JspTagException
JspTagException - when parent tag is not found
public Locale getLocale()
throws JspTagException
JspTagException - when parent tag is not found
public Locale getLocaleFromContext()
throws JspTagException
null
JspTagException - when parent tag is not foundpublic Locale getDefaultLocale()
public TimeZone getTimeZone()
public void fillStandardParameters(Parameters p)
throws JspTagException
p - the parameters
JspTagException - when parent tag is not found
protected Block getCurrentBlock()
throws JspTagException
JspTagException
public void setVartype(String t)
throws JspTagException
JspTagException
public final void setListdelimiter(String l)
throws JspTagException
l - delimiter
JspTagException - when parsing of attributes failspublic void setJspvar(String j)
public final void setWrite(String w)
throws JspTagException
JspTagException
public final void setEscape(String e)
throws JspTagException
JspTagExceptionpublic final Object getWriterValue()
public final void haveBody()
protected Object getEscapedValue(Object value)
throws JspTagException
value - initial value
JspTagException - when parsing of attributes fails
public FormTag getFormTag(boolean excpetion,
Attribute form)
throws JspTagException
excpetion - throw exception when form tag not foundform - name of form
JspTagException - when parsing of attributes fails
protected final Query getQuery(Attribute container)
throws JspTagException
JspTagException
public String appendMoreParameters(String connector,
String amp,
StringBuffer buf)
throws JspTagException
JspTagException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||