Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description and Examples

View navigation

View navigation can be used to define a criteria and destination for a navigation. The criteria is specified as a string literal in the "outcome" attribute and the target is the view name specified as a value for the "target" attribute. The following views components can generate an outcome.

  • <button />
    • Buttons can generate outcomes either by specifying a value for the "outcome" attribute or by returning a string from the action function
  • <submit />
    • Submit buttons can generate outcomes either by specifying a value for the "outcome" attribute or by returning a string from the action function
  • <action />
    • View actions can generate outcomes either by specifying a value for the "outcome" attribute or by returning a string from the button action function
  • <rowAction />
    • Row actions can generate outcomes by returning a string from the button action function
Code Block
languagexml
<navigation outcome="menu" target="TraineeMenu"/>

Dynamic navigation

From Helium 1.4 dynamic navigation is also supported. 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.

Code Block
languagexml
titleExample code snippet
 <action label="button.proceed" action="proceed"/>
Code Block
languagejava
DSL_VIEWS proceed() {
	return DSL_VIEWS.Workouts;
}