View Actions
View actions work with the entire view. They are usually defined in the top-level actions
element of the view XML and invoked by linked buttons. For example:
<view xmlns="http://jmix.io/schema/flowui/view"
title="msg://departmentDetailView.title"
focusComponent="form">
<!-- ... -->
<actions>
<action id="saveAction" type="detail_saveClose"/>
<action id="closeAction" type="detail_close"/>
</actions>
<layout>
<!-- ... -->
<hbox id="detailActions">
<button id="saveAndCloseBtn" action="saveAction"/>
<button id="closeBtn" action="closeAction"/>
</hbox>
detail_close
Action class: DetailCloseAction
Closes the entity detail view by invoking its close()
method. If the view has unsaved changes, it will show a standard dialog with Save | Don’t save | Cancel options.
detail_discard
Action class: DetailDiscardAction
Closes the entity detail view by invoking its close()
method and discarding any unsaved changes without prompt.
detail_enableEditing
Action class: DetailEnableEditingAction
Allows users to switch the entity detail view to the editable mode if it was open by the list_read action.
detail_save
Action class: DetailSaveAction
Saves changes in the entity detail view by invoking its save()
method. Does not close the view.
detail_saveClose
Action class: DetailSaveCloseAction
Saves changes in the entity detail view and closes it by invoking its closeWithSave()
method.
lookup_discard
Action class: LookupDiscardAction
Closes the entity list view by invoking its closeWithDiscard()
method.
lookup_select
Action class: LookupSelectAction
Handles selected items and closes the entity list view by invoking its handleSelection()
method.