|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.web.servlet.xel.RequestContexts
public class RequestContexts
RequestContexts maintains a stack of RequestContext to simplify
the signatures of the XEL function.
It is designed to make the signature of XEL functions
(see ServletFns) simpler.
For example, ServletFns.isExplorer() requires
no argument, since it assumes the current context can be retrieved
from getCurrent().
Spec Issue:
It is controversial whether the introduction of RequestContext and
RequestContexts is worth. However, we have to maintain the backward
compatibility of the XEL/EL function signatures.
| Constructor Summary | |
|---|---|
protected |
RequestContexts()
|
| Method Summary | |
|---|---|
static RequestContext |
getCurrent()
Returns the current page context if this thread is evaluating a page, or null if not. |
static void |
pop()
Pops the context out and use the previous one as the current context. |
static void |
push(RequestContext jc)
Pushes the context as the current context, such that it will be returned by getCurrent(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RequestContexts()
| Method Detail |
|---|
public static final RequestContext getCurrent()
public static final void push(RequestContext jc)
getCurrent(). The reason this method exists is
many functions (ServletFns) counts on it.
However, you don't need to invoke this method if you are using DSP.
InterpreterNote: you must use try/finally as follows:
RequestContexts.push(jc);
try {
...
} finally {
RequestContexts.pop();
}
public static final void pop()
However, you don't need to invoke this method if you are using DSP.
push(org.zkoss.web.servlet.xel.RequestContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||