The view element is used to specify details of the view. These include the view title, backing unit for the view and init function that should be called when the view is loaded. This is required for all Helium application views as all other view components including data input widgets and data output widgets are placed within the view element.
Example
The following code snippet shows and example of how to use the view element.
This specifies the heading that will be displayed for the view. It is required and references a key in the lang file
unit="ShopMgmt"
References from views to unit functions and variables can be done in two ways. Firstly, using the fully qualified name for the function or variables. This includes the unit name followed by a colon followed by the name of the function or variables. For example: MyUnit:myFunction or MyUnit:myVariable. Another way to reference function and variables in a view is to first specify the default unit for the view, as shown the code example above and them simply using the function and variables names.
init="init"
It is often useful to have a unit function execute when a view loads in order to perform some initialization operations such as initializing unit variables used in the view. This is achieved by specifying the init function as in the example above: init="init"
Add Comment