public class ContextTag extends ContextReferrerTag implements ContextProvider
A ContextTag is like parentheses, and as such can act as a 'namespace' (if it has an id) or as 'scope' (if it doesn't).
The context can be seen as a container for variables and their values.
(ContextReferrer) Tags living under a context tag can 'register' themselves in the context (by use of the 'id' attribute') and in that way become a variable. Other tags can refer to such variables.
A ContextTag is a ContextReferrer itself too, and therefore it is possible to 'nest' contextes. And perhaps we will also make it possible to treat contextes as variables and e.g. pass them to another page as a whole.
It is also possible to put something into the Context by hand. For that you can use the `ImportTag'.
Writing out the value of a variable can be done with the `Write' Tag.
ImportTag,
WriteTag,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
CONTAINER_KEY_PREFIX |
static String |
CONTEXTTAG_KEY |
static String |
DEFAULTENCODING_KEY |
static String |
ISELIGNORED_PARAM |
(package private) int |
number |
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid| Constructor and Description |
|---|
ContextTag() |
| Modifier and Type | Method and Description |
|---|---|
(package private) ContextContainer |
createContainer(ContextContainer c) |
int |
doAfterBody() |
int |
doEndTag() |
void |
doFinally() |
int |
doStartTag() |
Object |
findAndRegister(int from,
String referid,
String newid)
Deprecated.
Use getContextProvider().getContextContainer().findAndRegister
|
protected Object |
findAndRegister(int from,
String referid,
String newid,
boolean check)
Deprecated.
Use getContextProvider().getContextContainer().findAndRegister
|
Object |
findAndRegister(String id)
Deprecated.
Use getContextProvider().getContextContainer().findAndRegister
|
Object |
findAndRegister(String externid,
String newid)
Deprecated.
Use getContextProvider().getContextContainer().findAndRegister
|
String |
findAndRegisterString(String id)
Deprecated.
Use getContextProvider().getContextContainer().findAndRegisterString
|
Object |
getContainerObject(String key)
Deprecated.
Use getContextProvider().getContextContainer().getObject
|
ContextContainer |
getContextContainer() |
SerializableInputStream |
getInputStream(String key) |
boolean |
isPresent(String key)
Deprecated.
Use getContextProvider().getContextContainer().isPresent
|
boolean |
isRegistered(String key)
Deprecated.
Use getContextProvider().getContextContainer().isRegistered
|
void |
register(String newid,
Object n)
Deprecated.
Use getContextProvider().getContextContainer().register
|
void |
register(String newid,
Object n,
boolean check)
Deprecated.
Use getContextProvider().getContextContainer().register
|
void |
registerNode(String key,
Node node)
Deprecated.
Use getContextProvider().getContextContainer().registerNode
|
void |
reregister(String id,
Object n)
Deprecated.
Use getContextProvider().getContextContainer().reregister
|
void |
setCloudContext(CloudContext cc)
This context can also serve as a 'cloudcontext'.
|
void |
setPageContext(javax.servlet.jsp.PageContext pc) |
void |
setScope(String s) |
String |
toString() |
void |
unRegister(String key)
Deprecated.
Use getContextProvider().getContextContainer().unRegister
|
protected static javax.servlet.ServletRequest |
unwrap(javax.servlet.ServletRequest req) |
appendMoreParameters, doCatch, fillStandardParameters, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocale, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimer, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContextOnly, setReferid, setVartype, setWrite, setWriterdoInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPageContextgetIdpublic static final String CONTEXTTAG_KEY
public static final String CONTAINER_KEY_PREFIX
public static final String DEFAULTENCODING_KEY
public static final String ISELIGNORED_PARAM
int number
public void setScope(String s) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setCloudContext(CloudContext cc)
public void setPageContext(javax.servlet.jsp.PageContext pc)
setPageContext in interface javax.servlet.jsp.tagext.TagsetPageContext in class ContextReferrerTagContextContainer createContainer(ContextContainer c)
c - Parent context-container, if null then a container writing to page context will be instantiated.public ContextContainer getContextContainer()
getContextContainer in interface ContextProviderprotected static javax.servlet.ServletRequest unwrap(javax.servlet.ServletRequest req)
public int doStartTag()
throws javax.servlet.jsp.JspTagException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspTagExceptionpublic void registerNode(String key, Node node) throws javax.servlet.jsp.JspTagException
key - the key (id) of the node to registernode - the node to put in the hashmapjavax.servlet.jsp.JspTagExceptionpublic Object findAndRegister(int from, String referid, String newid) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected Object findAndRegister(int from, String referid, String newid, boolean check) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic Object findAndRegister(String externid, String newid) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void register(String newid, Object n, boolean check) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void register(String newid, Object n) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void unRegister(String key) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void reregister(String id, Object n) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic boolean isPresent(String key) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic boolean isRegistered(String key) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic Object findAndRegister(String id) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic String findAndRegisterString(String id) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic Object getContainerObject(String key) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic SerializableInputStream getInputStream(String key) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic int doAfterBody()
throws javax.servlet.jsp.JspTagException
doAfterBody in interface javax.servlet.jsp.tagext.IterationTagdoAfterBody in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspTagExceptionpublic int doEndTag()
throws javax.servlet.jsp.JspTagException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class ContextReferrerTagjavax.servlet.jsp.JspTagExceptionpublic void doFinally()
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinallydoFinally in class ContextReferrerTagMMBase 1.9-SNAPSHOT - ${javadoctimestamp}