fm:exit-module is used to leave modules that have been called. It has no attributes, and requires nothing but to be put within an action.
<fm:exit-module/>
The fm:exit-module command is the most direct way to leave a module:
If there are no more modules in the call stack on a module-exit, browser redirected to URL:
The <fm:state action=”pop”/> also behaves like exit-module when state stack is emptied.
The following code shows how fm:exit-module could be used within an action:
<fm:action name=”action-exit” fox:prompt=”Exit” fox:run=”.” fox:confirm=”Do you really want to exit?”>
<fm:do>
<fm:exit-module/>
</fm:do>
</fm:action>
If this is run in a module that has been called by another module, the previous module will be shown to the user. If this is the last module on the stack, the landing page will be shown. By default, this is http://www.og.berr.gov.uk.
Using your XX_EMPLOYEEMODULE (where XX are your initials), add an action, with the button widget, named “action-exit” that runs fm:exit-module. Set this action on the screen with a prompt of “Exit”.
Load up the module using the URL (http://vs-dev-app1/engdev8/fox/dev8/XX_EMPLOYEEMODULE/new) and click on the Exit button. Notice what happens?
Call your XX_EMPLOYEEMODULE using the URL with parameter P_PORTAL_MENU_PAGE set to “http://www.bbc.co.uk”. click on the Exit button. What do you see now?
Load your XX_ORDERMODULE and use the action you created in the previous chapter (action-employee) to call your XX_EMPLOYEEMODULE.
Look at the callStack DOM.
Run the Exit action in XX_EMPLOYEEMODULE.
Look at the callStack DOM now.