The device-config Element"
From Documentation
(Replaced content with '{{ZKConfigurationReferencePageHeader}} {{ZKConfigurationReferenceHeadingToc}} ==Version History== {| border='1px' | width="100%" ! Version !! Date !! Content |- | …') |
Tmillsclare (talk | contribs) m |
||
Line 1: | Line 1: | ||
{{ZKConfigurationReferencePageHeader}} | {{ZKConfigurationReferencePageHeader}} | ||
+ | |||
+ | |||
+ | It specifies a device. A device represents a client. Different clients have different implementation. Currently there are two types: <tt>ajax</tt> and <tt>mil</tt>. They represents 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 <tt>getDevice</tt> method of the <tt>Desktop</tt> intereface. | ||
+ | |||
+ | The allowed child element is <tt>device-type</tt> , <tt>device-class</tt>, <tt>timeout-uri</tt>, and <tt>unavailable-message</tt>. You might have multiple <tt>device-config</tt> elements in one <tt>zk.xml</tt>. | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <device-config> | ||
+ | <device-type>ajax</device-type> | ||
+ | <device-class>my.MyAjaxDevice</device-class> | ||
+ | <timeout-uri>/my-timeout.zul</timeout-uri> | ||
+ | <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> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | '''Note:''' Unlike most other configurations defined in <tt>WEB-INF/zk.xml</tt>, the definitions defined in <tt>device-config</tt> are applied to all Web applications sharing the same <tt>zk.jar</tt>. Refer to the <tt>zscript-config</tt> element for more information. | ||
+ | |||
+ | |||
+ | '''Notes''' | ||
+ | <references/> | ||
+ | |||
{{ZKConfigurationReferenceHeadingToc}} | {{ZKConfigurationReferenceHeadingToc}} |
Revision as of 10:47, 3 December 2010
It specifies a device. A device represents a client. Different clients have different implementation. Currently there are two types: ajax and mil. They represents 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>
<timeout-uri>/my-timeout.zul</timeout-uri>
<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.
Version History
Version | Date | Content |
---|---|---|