|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.device.Devices
public class Devices
A manager of devices (Device).
| Method Summary | |
|---|---|
static void |
add(org.zkoss.idom.Element config)
Adds a device based on the XML declaration. |
static java.lang.String |
add(java.lang.String type,
java.lang.String cls)
Adds a device. |
static boolean |
exists(java.lang.String type)
Tests whether the device for the specified type exists. |
static java.lang.String |
getTimeoutURI(java.lang.String type)
Returns the timeout URI for the specified device type. |
static java.lang.String |
getUnavailableMessage(java.lang.String type)
Returns the unavailable message for the specified device type. |
static Device |
newDevice(Desktop desktop)
Returns the device for the specified desktop. |
static java.lang.String |
setTimeoutURI(java.lang.String type,
java.lang.String timeoutURI)
Sets the timeout URI for the specified device type. |
static java.lang.String |
setUnavailableMessage(java.lang.String type,
java.lang.String msg)
Sets the unavailable message for the specified device type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final Device newDevice(Desktop desktop)
desktop - the desktop to create a device and associate with.
DeviceNotFoundException - if not found.public static final boolean exists(java.lang.String type)
type - the device type, say, ajax.
public static final java.lang.String add(java.lang.String type,
java.lang.String cls)
type - the device type (aka., the device name).cls - the device class name
public static final java.lang.String getUnavailableMessage(java.lang.String type)
Note: the current device (the device associated with the current desktop) might have a different message.
Device,
Device.getUnavailableMessage()
public static final java.lang.String setUnavailableMessage(java.lang.String type,
java.lang.String msg)
Device) that are created for
the new desktops. The message for the devices that are already
instantiated are not changed.
Device,
Device.setUnavailableMessage(java.lang.String)public static final java.lang.String getTimeoutURI(java.lang.String type)
Default: null (to shown an error message).
Note: the current device (the device associated with the current desktop) might have a different timeout URI.
public static final java.lang.String setTimeoutURI(java.lang.String type,
java.lang.String timeoutURI)
timeoutURI - the timeout URI. If empty, it means to reload
the same page. If null, an error message is shown instead of
redirecting to another page.
public static final void add(org.zkoss.idom.Element config)
<device-config>
<device-type>superajax</device-type>
<device-class>my.MyDevice</device-class>
<unavailable-message>error message</unavailable-message>
</device-config>
config - the XML element called zscript-config
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||