Default actions
Generated applications have default actions, which are triggered when the user clicks on an action view on the form (such as a Toolbar icon). The actions are enabled appropriately as the BDL interactive statements in the generated application are executed.
Default actions
The user interface for your BAM program is based on the form created for the program. When you
set the Functionality properties on form records, you are specifying which
default actions should be available to the user. For example, if the canSearch
property is checked, the default actions needed to input criteria and search the database would be
generated.
Actions can be programmatically enabled and disabled, hidden and shown, with methods such as
ui.Dialog.setActionActive()
and ui.Dialog.setActionHidden()
. The
text, image and other attributes of the action can be controlled with an action default file
(4ad
). See the Genero Business Development Language User Guide.
Action Text | Action Name | Description |
---|---|---|
New | new |
Adds a new record in the master, whether or not the focus is in the master or a detail. |
Insert | insert |
Appends a new record at the end of the list of the currently selected table - either master or detail. |
Append | append |
Adds a new record at the location of the current selection - either in a master or a detail. The append and new actions are equivalent if the focus is in the master. |
Modify | modify |
Update a record. |
Search | query |
Search the database table; enter criteria in the relevant fields and click Accept; or click Accept on an empty form to retrieve all the records in the database table. |
Delete | delete |
Delete a database record. |
Zoom | zoom |
Activate the zoom form. |
First | firstrow |
Navigate to the first record. |
Last | lastrow |
Navigate to the last record. |
Next | nextrow |
Navigate to the next record. |
Previous | prevrow |
Navigate to the previous record. |
About the new, append, and insert actions
The new
, append
, and insert
actions always
create a new record. The new
action only creates a master record. The
append
and insert
actions create either a master record or a
detail record. The new
action is a global action. The append
and
insert
actions are contextual according to the container. The new
and append
actions will always appear in the Toolbar/Topmenu. The
insert
action will appear in the Toolbar/Topmenu if there is at least one list on
the CRUD form.
Figure: Actions displayed in a desktop vs. mobile app
![This figure is a screenshot of the Default Toolbar showing default actions.](Images/bamdefaultactions.jpg)
![This figure is a screenshot of the actions rendered in an Android app.](Images/iosnavigationtoolbar2.jpg)
See the Action rendering topic in the Mobile applications section of the Genero Business Development Language User Guide for information on the default action rendering in Androidâ„¢ and iOS mobile apps.
Report actions
If a Report entity is implemented in the BA diagram, additional actions are enabled for the user. Which actions appear is controlled by the Report Options properties of the Form entity.
Figure: Default Toolbar with Report options
![This figure is a screenshot of the default Toolbar with report options.](Images/reporttoolbar.jpg)
Action Text | Action Name | Description |
---|---|---|
reportprint | Print a defined report. | |
Preview | reportpreview | Preview a defined report. |
Print... | reportsetup | Select report and printer or export settings in Report Print Settings window. If no report design template (4rp) is available for the report, the Select Fields button is enabled to select fields for the report. |
reportexportpdf | Export report to PDF format. | |
HTML | reportextporthtml | Export report to HTML format. |
XLS | reportexportxls | Export report to XLS (Excel) format. |
RTF | reportexportrtf | Export report to RTF (MS-Word) format. |