public interface Client
Modifier and Type | Method and Description |
---|---|
DesktopAgent |
connect(java.lang.String zulPath)
connect to a zul file, you have to provide the path that relative to the resource root folder
|
DesktopAgent |
connectAsIncluded(java.lang.String zulPath,
java.util.Map<java.lang.String,java.lang.Object> args)
connect to a zul file, you have to provide the path that relative to the resource root folder.
|
DesktopAgent |
connectWithContent(java.lang.String content,
java.lang.String ext,
ComponentAgent parent,
java.util.Map<java.lang.String,java.lang.Object> args)
Connect to a zul content or another language from a string.
|
void |
destroy()
destroy this client, it will also destory all un-destroyed desktops that is created by this client
|
java.lang.String |
getCookie(java.lang.String name)
get value of cookie with specify name.
|
java.util.Map<java.lang.String,java.lang.String> |
getCookies()
get all cookies in an unmodifiable map.
|
EchoEventMode |
getEchoEventMode()
get the current echo event handling mode.
|
void |
setCookie(java.lang.String name,
java.lang.String value)
set cookie for the client, the cookie will be sent at every HTTP request.
|
void |
setEchoEventMode(EchoEventMode mode)
change the echo event handling mode.
|
DesktopAgent connect(java.lang.String zulPath)
ZatsEnvironment.init(String)
DesktopAgent connectAsIncluded(java.lang.String zulPath, java.util.Map<java.lang.String,java.lang.Object> args)
zulPath
- the path of zul file.args
- the arguments to pass.ZatsEnvironment.init(String)
DesktopAgent connectWithContent(java.lang.String content, java.lang.String ext, ComponentAgent parent, java.util.Map<java.lang.String,java.lang.Object> args)
content
- the raw content of the page. It must be a XML and
compliant to the page format (such as ZUL).extension
- the default extension if the content doesn't specify
an language. In other words, if
the content doesn't specify an language, LanguageDefinition.getByExtension(java.lang.String)
is called.
If extension is null and the content doesn't specify a language,
the language called "xul/html" is assumed.parent
- the parent component, or null if you want it to be
a root component. If parent is null, the page is assumed to be
the current page, which is determined by the execution context.
In other words, the new component will be the root component
of the current page if parent is null.arg
- a map of parameters that is accessible by the arg variable
in EL, or by Execution.getArg()
.
Ignored if null.Executions.createComponentsDirectly(String, String, org.zkoss.zk.ui.Component, Map)
void destroy()
void setCookie(java.lang.String name, java.lang.String value)
name
- The name of the cookie, it should not be null or empty string.value
- The value of the cookie. If the value is null, it will erase this cookie.java.lang.String getCookie(java.lang.String name)
name
- The name of the cookie, it should not be null or empty string.java.util.Map<java.lang.String,java.lang.String> getCookies()
void setEchoEventMode(EchoEventMode mode)
mode
- Control echo event handling mode. If null, do nothing.EchoEventMode
EchoEventMode getEchoEventMode()
EchoEventMode
Copyright © 2019 Potix Corporation. All rights reserved.