The automatic-timeout Element"

From Documentation
m
 
(6 intermediate revisions by 3 users not shown)
Line 8: Line 8:
 
  [Default: false]
 
  [Default: false]
  
It specifies whether to automatically redirect to the timeout URI.
+
It specifies whether or not to automatically redirect to the timeout URI.
  
If false, it means a page will be redirected to the timeout URI, when the use takes some action after timeout.
+
If <code>false</code>, it means a page will be redirected to the timeout URI, when a user takes some actions after the timeout.
  
In other words, nothing happens (no redirect) if the user does nothing on the page.
+
In other words, nothing would happen (no redirect) if the user does nothing on the page.
  
If it is set to true, it is redirected as soon as timeout, no matter the user takes any action.
+
If it is set to <code>true</code>, it is redirected as soon as timeout, no matter the user takes any action.
  
 
Notice that this setting is applied only to the specified device ([[#The device-type Element|&lt;device-type&gt;]]), so remember to specify the correct device. For example,
 
Notice that this setting is applied only to the specified device ([[#The device-type Element|&lt;device-type&gt;]]), so remember to specify the correct device. For example,
Line 26: Line 26:
 
</source>
 
</source>
  
<blockquote>
+
Please refer to [[ZK Developer's Reference/UI Patterns/Session Timeout Management]] for more information.
 +
 
 
=== Page-level Automatic Timeout ===
 
=== Page-level Automatic Timeout ===
  
If you want to specify whether to automatically timeout for particular pages, you can use [[ZUML Reference/ZUML/Processing Instructions/page#automaticTimeout | the page directive]].
+
If you want to specify whether or not to automatically timeout for particular pages, you can use [[ZUML Reference/ZUML/Processing Instructions/page#automaticTimeout | the page directive]].
  
 
Moreover, it is better to turn off the automatic timeout for the timeout page you want to redirect to (if the page is a ZUML page). For example,
 
Moreover, it is better to turn off the automatic timeout for the timeout page you want to redirect to (if the page is a ZUML page). For example,
Line 38: Line 39:
 
...
 
...
 
</source>
 
</source>
</blockquote>
 
  
=Version History=
+
= Underlying Details =
{{LastUpdated}}
+
ZK relies on js setTimeout() and sends a <code>dummy</code> event to a server to trigger a session timeout happening.
{| border='1px' | width="100%"
+
 
! Version !! Date !! Content
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
{{ZKConfigurationReferencePageFooter}}
 
{{ZKConfigurationReferencePageFooter}}

Latest revision as of 06:16, 1 March 2024


The automatic-timeout Element


Syntax:

<automatic-timeout>true|false</automatic-timeout>
[Optional]
[Since 3.6.3]
[Default: false]

It specifies whether or not to automatically redirect to the timeout URI.

If false, it means a page will be redirected to the timeout URI, when a user takes some actions after the timeout.

In other words, nothing would happen (no redirect) if the user does nothing on the page.

If it is set to true, it is redirected as soon as timeout, no matter the user takes any action.

Notice that this setting is applied only to the specified device (<device-type>), so remember to specify the correct device. For example,

<session-config>
	<device-type>ajax</device-type>
	<automatic-timeout/> <!-- the same as <automatic-timeout>true</automatic-timeout> -->
	<timeout-uri>/timeout.zul</timeout-uri>
</session-config>

Please refer to ZK Developer's Reference/UI Patterns/Session Timeout Management for more information.

Page-level Automatic Timeout

If you want to specify whether or not to automatically timeout for particular pages, you can use the page directive.

Moreover, it is better to turn off the automatic timeout for the timeout page you want to redirect to (if the page is a ZUML page). For example,

<!-- my timeout page -->
<?page automaticTimeout="false"?>
...

Underlying Details

ZK relies on js setTimeout() and sends a dummy event to a server to trigger a session timeout happening.



Last Update : 2024/03/01

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.