Navigating without user interaction
m ((username removed) (log details removed))
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Edited|July|12|2025}}
<message>Write the content here to display this box</message>
Sometimes, for example, after a user has logged in, you want to automatically navigate to another page.
Sometimes, for example, after a user has logged in, you want to automatically navigate to another page.


Do this:
Do this:
# Place a [[Period action]] on the form.  
# Place a [[Documentation:Periodic action|Period action]] on the form.  
# Set a navigating action on it.
# Set a navigating action on it.
# Set the disabled expression to something like "disabled when not logged in".
# Set the disabled expression to something like "disabled when not logged in".
# Set the interval to something other than -1 (disabled) for example 10 (ms).
# Set the interval to something other than -1 (disabled) for example 10 (ms).


'''Note!''' If you create a ViewModel that requires a root object, be sure to send it or your action will NOT RUN. The [[Index page]] is called without a root object. For this reason, use SysSingleton.oclSingleton instead.
'''Note!''' If you create a ViewModel that requires a root object, be sure to send it or your action will NOT RUN. The [[Documentation:Index page|Index page]] is called without a root object. For this reason, use SysSingleton.oclSingleton instead.


Example of an Index (web) page that automatically navigates to a user dashboard upon login.
Example of an Index (web) page that automatically navigates to a user dashboard upon login.
[[File:Automatic navigation on Index page.png|none|thumb|851x851px]]
[[File:Automatic navigation on Index page.png|none|thumb|851x851px]]
[[Category:Navigation]]
[[Category:Navigation]]

Latest revision as of 05:01, 28 January 2025

This page was created by Lars.olofsson@mdriven.net on 2019-06-10. Last edited by Stephanie@mdriven.net on 2025-01-28.


Sometimes, for example, after a user has logged in, you want to automatically navigate to another page.

Do this:

  1. Place a Period action on the form.
  2. Set a navigating action on it.
  3. Set the disabled expression to something like "disabled when not logged in".
  4. Set the interval to something other than -1 (disabled) for example 10 (ms).

Note! If you create a ViewModel that requires a root object, be sure to send it or your action will NOT RUN. The Index page is called without a root object. For this reason, use SysSingleton.oclSingleton instead.

Example of an Index (web) page that automatically navigates to a user dashboard upon login.

Automatic navigation on Index page.png