Package org.zkoss.zk.device
Class AjaxDevice
java.lang.Object
org.zkoss.zk.device.GenericDevice
org.zkoss.zk.device.AjaxDevice
- All Implemented Interfaces:
Device
Represents a Web browser with the Ajax support.
- Since:
- 2.4.0
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturnstext/htmlReturns<!booleanReturn false to indicate it is not cacheable.isCompatible(String userAgent) Returns null to indicate unknown.packageToPath(String pkg) Converts a package to a path that can be accessible by the class loader (classpath).voidreloadMessages(Locale locale) Reloads the client-side messages in the specified locale.toAbsolutePath(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
-
Constructor Details
-
AjaxDevice
public AjaxDevice()
-
-
Method Details
-
isCacheable
public boolean isCacheable()Return false to indicate it is not cacheable.- Specified by:
isCacheablein interfaceDevice- Overrides:
isCacheablein classGenericDevice
-
isCompatible
Description copied from class:GenericDeviceReturns null to indicate unknown. Deriving should override it to provide more precise information.- Specified by:
isCompatiblein interfaceDevice- Overrides:
isCompatiblein classGenericDevice- Parameters:
userAgent- represents a client. For HTTP clients, It is the user-agent header.- Returns:
- Boolean.TRUE if this device supports the specified client, Boolean.FALSE if cannot, or null if unknown.
- See Also:
-
getContentType
Returnstext/html -
getDocType
Returns<!DOCTYPE html>. (since 7.0.0)- Specified by:
getDocTypein interfaceDevice- Overrides:
getDocTypein classGenericDevice
-
packageToPath
Converts a package to a path that can be accessible by the class loader (classpath).Default: "/js/" + pkg + ".wpd";
- Specified by:
packageToPathin interfaceDevice- Overrides:
packageToPathin classGenericDevice- Since:
- 5.0.4
-
toAbsolutePath
Converts a relative path to an absolute path that can be accessible by the class loader (classpath).Default: "/js/" + path (if path doesn't start with '/' or '~').
- Specified by:
toAbsolutePathin interfaceDevice- Overrides:
toAbsolutePathin classGenericDevice- Parameters:
path- the path (never null). It is assumed to be a relative path if not starting with '/' or '~'.- Since:
- 5.0.4
-
reloadMessages
Description copied from class:GenericDeviceReloads the client-side messages in the specified locale.Default: throw UnsupportedOperationException.
- Specified by:
reloadMessagesin interfaceDevice- Overrides:
reloadMessagesin classGenericDevice- Parameters:
locale- the locale. If null,Locales.getCurrent()is assumed.- Throws:
IOException
-