|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zkplus.embed.Bridge
public class Bridge
Utilities to allow developers to start an execution in foreign Ajax channel.
Bridge bridge = Bridge.start(svlctx, request, response, desktop);
try {
//execution is activated and you could access anything belonging to the desktop
String jscode = bridge.getResult();
//send jscode back to the client to update DOM, if any
} finally {
bridge.close(); //stop the execution
}
See also Start Execution in Foreign Ajax Channel
Constructor Summary | |
---|---|
protected |
Bridge(javax.servlet.ServletContext svlctx,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Desktop desktop,
java.lang.Object locale)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the execution such that other requests targeting the same desktop can be processed. |
static Desktop |
getDesktop(javax.servlet.ServletContext svlctx,
javax.servlet.http.HttpServletRequest request,
java.lang.String dtid)
Returns the desktop of the given desktop ID, or null if not found. |
Execution |
getExecution()
Returns the execution. |
java.lang.String |
getResult()
Returns the result in the JavaScript. |
static Bridge |
start(javax.servlet.ServletContext svlctx,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Desktop desktop)
Starts an execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Bridge(javax.servlet.ServletContext svlctx, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Desktop desktop, java.lang.Object locale) throws java.lang.Exception
start(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.zkoss.zk.ui.Desktop)
instead.
java.lang.Exception
Method Detail |
---|
public static Bridge start(javax.servlet.ServletContext svlctx, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Desktop desktop)
After processing, the caller shall invoke close()
to stop
the execution (in the finally clause).
desktop
- the desktop you want to access.
You could retrieve by use of getDesktop(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, java.lang.String)
.public static Desktop getDesktop(javax.servlet.ServletContext svlctx, javax.servlet.http.HttpServletRequest request, java.lang.String dtid)
dtid
- the desktop's ID.public Execution getExecution()
public java.lang.String getResult()
eval(jscode);
).
After calling this method, the caller shall not modify the component's state any more.
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |