Navigation



Any view component that has an action function binding that results in an outcome being returned to the view can invoke a navigation directly without the need for a navigation rule. This is achieved by returning a value of type DSL_VIEWS from the action binding function instead of an string. DSL_VIEWS represents a new built-in enum with values representing the views in the application.

Note that in view components that support both an "outcome" attribute and a function binding using the "action" attribute, and for which both values have been specified, will execute the functions but will always prioritise the value of the "outcome" attribute for navigation thus needing a navigation rule.

Example code snippet
 <action label="button.proceed" action="proceed"/>
DSL_VIEWS proceed() {
	return DSL_VIEWS.Workouts;
}

In the above example, Helium will attempt to navigate to a view defined in a file called Workouts.vxml.

Helium will, in general, attempt to execute an init function for a view that is loaded as a result of a navigation. An exception to this, is when navigating from a view to itself. In such case the init function will not be executed. Please see here from details on how to specify an init function for a view.