The problem In case users' session expires, or some other error happens, you would like to redirect them a page you created that will, for instance, tell users to log in and try again, and if the problem persists to contact customer support.
The solution- By default, when an error happens, Orbeon Forms shows users an error dialog. First, you'll want to disable this behavior. You can do so by adding this property to your
properties-local.xml:
<property as="xs:boolean" name="oxf.xforms.show-error-dialog" value="false"/>
- Orbeon Forms exposes a custom JavaScript event
ORBEON.xforms.Events.errorEvent. You can register your own listener on that event, and when fired, send users to a page you choose, as done in the following snippet, which sends users to the Orbeon home page:
ORBEON.xforms.Events.errorEvent.subscribe(function(eventName, eventData) {
window.location.href = "http://www.orbeon.com/";
});
|
|