The device-config Element"
From Documentation
Maya001122 (talk | contribs) (Created page with '== The device-config Element == It specifies a device. A device represents a client. Different clients have different implementation. Currently there are two types: <tt>ajax</tt>…') |
m (correct highlight (via JWB)) |
||
(11 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{ZKConfigurationReferencePageHeader}} | |
− | |||
− | The allowed child element is < | + | |
+ | It specifies a device. A device represents a client. Different clients have different implementation. Currently there are two types: <code>ajax</code> and <code>mil</code>. They represent the Web browsers with Ajax, and the mobile device with Mobile Interactive Language<ref>MIL is a ZK markup language used to communicate with the mobile devices.</ref>. It is used to create an instance returned by the <code>getDevice</code> method of the <code>Desktop</code> intereface. | ||
+ | |||
+ | The allowed child element is <code>device-type</code> , <code>device-class</code>, <code>timeout-uri</code>, and <code>unavailable-message</code>. You might have multiple <code>device-config</code> elements in one <code>zk.xml</code>. | ||
<source lang="xml" > | <source lang="xml" > | ||
Line 8: | Line 10: | ||
<device-type>ajax</device-type> | <device-type>ajax</device-type> | ||
<device-class>my.MyAjaxDevice</device-class> | <device-class>my.MyAjaxDevice</device-class> | ||
− | |||
<server-push-class>my.ServerPush</server-push-class> | <server-push-class>my.ServerPush</server-push-class> | ||
<unavailable-message><![CDATA[ | <unavailable-message><![CDATA[ | ||
Line 24: | Line 25: | ||
− | '''Note:''' Unlike most other configurations defined in < | + | '''Note:''' Unlike most other configurations defined in <code>WEB-INF/zk.xml</code>, the definitions defined in <code>device-config</code> are applied to all Web applications sharing the same <code>zk.jar</code>. Refer to the <code>zscript-config</code> element for more information. |
Line 31: | Line 32: | ||
+ | {{ZKConfigurationReferenceHeadingToc}} | ||
− | + | {{ZKConfigurationReferencePageFooter}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 10:19, 19 January 2022
It specifies a device. A device represents a client. Different clients have different implementation. Currently there are two types: ajax
and mil
. They represent the Web browsers with Ajax, and the mobile device with Mobile Interactive Language[1]. It is used to create an instance returned by the getDevice
method of the Desktop
intereface.
The allowed child element is device-type
, device-class
, timeout-uri
, and unavailable-message
. You might have multiple device-config
elements in one zk.xml
.
<device-config>
<device-type>ajax</device-type>
<device-class>my.MyAjaxDevice</device-class>
<server-push-class>my.ServerPush</server-push-class>
<unavailable-message><![CDATA[
<p style="color:red">Sorry, JavaScript must be enabled in order for you to use KillApp.</p>
]]></unavailable-message>
<embed><![CDATA[
<script type="text/javascript">
AU_progressbar = function (id, msg) {
Boot_progressbox(id, msg, 0, 0, true, true);
};
</script>
]]></embed>
</device-config>
Note: Unlike most other configurations defined in WEB-INF/zk.xml
, the definitions defined in device-config
are applied to all Web applications sharing the same zk.jar
. Refer to the zscript-config
element for more information.
Notes
- ↑ MIL is a ZK markup language used to communicate with the mobile devices.