Hi, you can put it on any zul page for single usage or zk.xml for global usage. Check the document on how to put in zk.xml
vincentjian ( 2013-04-24 03:10:06 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi there,
I'd like to know if it's possible to somehow combine
<session-config>
<device-type>ajax</device-type>
<timeout-message>label:timeout</timeout-message>
</session-config>
and
<session-config>
<device-type>ajax</device-type>
<timeout-uri>/timeout.zul</timeout-uri>
</session-config>
Doing this (below) causes a redirect without a message. How can I have it redirect after the message box is closed? Thanks!
<session-config>
<device-type>ajax</device-type>
<timeout-message>label:timeout</timeout-message>
<timeout-uri>/timeout.zul</timeout-uri>
</session-config>
Hi iank,
According to the document timeout message Element.
<timeout-message> and <timeout-uri> can't be used together. But you can override the obsolute function to redirect to other page when user click cancel button.
<script><![CDATA[
zk.afterMount(function() {
zAu.cmd0.obsolete = function (dtid, msg) {
if (msg.startsWith("script:"))
return $eval(msg.substring(7));
var v = zk.Desktop.$(dtid);
if (v && (v = v.requestPath))
msg = msg.replace(dtid, v + ' (' + dtid + ')');
jq.alert(msg, {
icon: 'ERROR',
button: {
Reload: function () {location.reload();},
Cancel: function () {
/* do anything here when click cancel */
location.href = 'timeout.zul';
}
}
});
}
});
]]></script>
Hi, you can put it on any zul page for single usage or zk.xml for global usage. Check the document on how to put in zk.xml
vincentjian ( 2013-04-24 03:10:06 +0800 )editMy application is developed in zk. Here when ia ma accessing my application simultaneous in two browsers i am getting the message like "The server is temporarily out of service. Would you like to try again? (0)"
i would not want this message, when ever i get this message my application would redirect automatically with out any message. I have used
<session-config>
<device-type>ajax</device-type>
<timeout-message>label:timeout</timeout-message>
<timeout-uri>/timeout.zul</timeout-uri>
</session-config>
in zk.xml. But i am getting the message. How can i redirect my application without message.
Regards, Vasanth
Asked: 2013-04-22 23:40:44 +0800
Seen: 90 times
Last updated: Jul 04 '13