|
||||||||||
| 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
org.mmbase.bridge.jsp.taglib.ContextTag
public class ContextTag
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| Field Summary | |
|---|---|
static String |
CONTAINER_KEY_PREFIX
|
static String |
CONTEXTTAG_KEY
|
static String |
DEFAULTENCODING_KEY
|
static String |
ISELIGNORED_PARAM
|
(package private) int |
number
|
| Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
|---|
contextId, EVAL_BODY, helper, id, pageContextTag, writerid |
| 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 | |
|---|---|
ContextTag()
|
|
| Method Summary | |
|---|---|
(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(PageContext pc)
|
void |
setReferid(String r)
ContextReferrers normally can have the attribute 'referid'. |
void |
setScope(String s)
|
String |
toString()
|
void |
unRegister(String key)
Deprecated. Use getContextProvider().getContextContainer().unRegister |
protected static ServletRequest |
unwrap(ServletRequest req)
|
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doInitBody, 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, wait, wait, wait |
| Methods inherited from interface org.mmbase.bridge.jsp.taglib.ContextProvider |
|---|
getPageContext |
| Methods inherited from interface org.mmbase.bridge.jsp.taglib.TagIdentifier |
|---|
getId |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
getParent, setParent |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public ContextTag()
| Method Detail |
|---|
public void setReferid(String r)
throws JspTagException
ContextReferrerTag
setReferid in class ContextReferrerTagr - referid value
JspTagException - when parsing of attributes fails
public void setScope(String s)
throws JspTagException
JspTagExceptionpublic void setCloudContext(CloudContext cc)
public void setPageContext(PageContext pc)
setPageContext in interface 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 ServletRequest unwrap(ServletRequest req)
public int doStartTag()
throws JspTagException
doStartTag in interface TagdoStartTag in class BodyTagSupportJspTagException
public void registerNode(String key,
Node node)
throws JspTagException
key - the key (id) of the node to registernode - the node to put in the hashmap
JspTagException
public Object findAndRegister(int from,
String referid,
String newid)
throws JspTagException
JspTagException
protected Object findAndRegister(int from,
String referid,
String newid,
boolean check)
throws JspTagException
JspTagException
public Object findAndRegister(String externid,
String newid)
throws JspTagException
JspTagException
public void register(String newid,
Object n,
boolean check)
throws JspTagException
JspTagException
public void register(String newid,
Object n)
throws JspTagException
JspTagException
public void unRegister(String key)
throws JspTagException
JspTagException
public void reregister(String id,
Object n)
throws JspTagException
JspTagException
public boolean isPresent(String key)
throws JspTagException
JspTagException
public boolean isRegistered(String key)
throws JspTagException
JspTagException
public Object findAndRegister(String id)
throws JspTagException
JspTagException
public String findAndRegisterString(String id)
throws JspTagException
JspTagException
public Object getContainerObject(String key)
throws JspTagException
JspTagException
public SerializableInputStream getInputStream(String key)
throws JspTagException
JspTagException
public int doAfterBody()
throws JspTagException
doAfterBody in interface IterationTagdoAfterBody in class BodyTagSupportJspTagException
public int doEndTag()
throws JspTagException
doEndTag in interface TagdoEndTag in class ContextReferrerTagJspTagExceptionpublic void doFinally()
doFinally in interface TryCatchFinallydoFinally in class ContextReferrerTagpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||