|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.device.GenericDevice org.zkoss.zk.device.AjaxDevice
public class AjaxDevice
Represents a Web browser with the Ajax support.
Constructor Summary | |
---|---|
AjaxDevice()
|
Method Summary | |
---|---|
java.lang.String |
getContentType()
Returns text/html |
java.lang.String |
getDocType()
Returns <! |
boolean |
isCacheable()
Return false to indicate it is not cacheable. |
java.lang.Boolean |
isCompatible(java.lang.String userAgent)
Returns null to indicate unknown. |
java.lang.String |
packageToPath(java.lang.String pkg)
Converts a package to a path that can be accessible by the class loader (classpath). |
void |
reloadMessages(java.util.Locale locale)
Reloads the client-side messages in the specified locale. |
java.lang.String |
toAbsolutePath(java.lang.String path)
Converts a relative path to an absolute path that can be accessible by the class loader (classpath). |
Methods inherited from class org.zkoss.zk.device.GenericDevice |
---|
addEmbedded, getEmbedded, getServerPushClass, getType, getUnavailableMessage, init, isSupported, matches, sessionDidActivate, sessionWillPassivate, setServerPushClass, setUnavailableMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxDevice()
Method Detail |
---|
public boolean isCacheable()
isCacheable
in interface Device
isCacheable
in class GenericDevice
public java.lang.Boolean isCompatible(java.lang.String userAgent)
GenericDevice
isCompatible
in interface Device
isCompatible
in class GenericDevice
userAgent
- represents a client.
For HTTP clients, It is the user-agent header.
Execution.getUserAgent()
,
Devices.getDeviceByClient(java.lang.String)
public java.lang.String getContentType()
text/html
public java.lang.String getDocType()
<!DOCTYPE html>
. (since 7.0.0)
getDocType
in interface Device
getDocType
in class GenericDevice
public java.lang.String packageToPath(java.lang.String pkg)
Default: "/js/" + pkg + ".wpd";
packageToPath
in interface Device
packageToPath
in class GenericDevice
public java.lang.String toAbsolutePath(java.lang.String path)
Default: "/js/" + path (if path doesn't start with '/' or '~').
toAbsolutePath
in interface Device
toAbsolutePath
in class GenericDevice
path
- the path (never null).
It is assumed to be a relative path if not starting with '/' or '~'.public void reloadMessages(java.util.Locale locale) throws java.io.IOException
GenericDevice
Default: throw UnsupportedOperationException.
reloadMessages
in interface Device
reloadMessages
in class GenericDevice
locale
- the locale. If null, Locales.getCurrent()
is assumed.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |