Actions & Menus

The view action is used to open object views. The view actions are used to define application menu.

View Action

The <action-view> is used to define the action views.

Table 1. Attributes
Name Description


name of the action


override the view title


fully qualified name of the model object


icon displayed on top-level navigation tab

The action view requires the following elements:

  • <view> - specify the view to use

    • type - the view type

    • name - the view name

  • <view-param> - define additional view parameter

    • name - parameter name

    • value - parameter value

  • <domain> - specify a domain filter to restrict search (jpql where clause)

  • <context> - define the base context for the action

    • name - context variable name

    • expr - context variable value expression

The <view-param> parameter name accepts the following options:

  • forceEdit - true to force to open in editable mode

  • forceTitle - true to force to use action title instead of view title

  • showArchived - true to include archived records

  • details-view - true to show grid and form views side by side

  • search-filters - name of custom search filters

  • default-search-filters - comma-separated list of search filter names to apply by default (used in conjunction with search-filters) - new in version 5.4.2

  • limit - maximum number of records per page (grid/cards view) or per column (kanban view)

  • popup - true to open view as popup, reload to reload parent upon closing the popup

  • popup-save - false to hide OK button used to save record upon closing the popup

  • popup.maximized - true to open as maximized popup

  • show-toolbar - false to hide form toolbar

  • show-confirm - false to disable dirty check

  • reload-dotted - true to refresh the grid when switching back from form view

  • download - true to mark view as pointing to a downloadable link

  • kanban-hide-columns - hide specific columns in kanban (comma separated list of names)

  • kanban-column-width - desired kanban column width

Special context variable names

  • _showRecord - show the record by given id in form view

  • _showSingle - true to show the only record in form view


<action-view name="contact.all" title="Contacts"
  model=""> (1)
  <view type="grid" name="contact-grid"/> (2)
  <view type="form" name="contact-form"/> (3)

<action-view name="contact.friends" title="My Friends"
  <view type="grid" name="contact-grid"/>
  <view type="form" name="contact-form"/>
  <domain> = :circleCode</domain> (4)
  <context name="circleCode" expr="friend"/> (5)
1 define an action-view for the given object
2 use the contact-grid view defined for the grid view
3 use the contact-form view defined for the form view
4 define a domain filter (jpql where clause)
5 define a context variable

You can see the <domain> filter uses named parameters. These parameters are evaluated against the context.

Application Menu

In order to access object views, we need application menu. The menu is also defined using xml syntax along with views & view actions.

The <menuitem> is used to define a menu item. The application menu is hierarchical so menu items can be organized as parent child.

Table 2. Attributes
Name Description


name of the menu item


name of the parent menu item


display title


display icon name


icon background color (predefined or html hex color)


the action to be executed on menu item click


menu item display order sequence


comma-separated list of user groups who can see this menu item


whether to show this menu on top


whether to show this menu on left


whether to hide this menu


specify a tag to show on menu item


specify whether to use count of menu action records as tag


specify a method call to get tag value


specify the tag display style


<menuitem name="menu-contact-book"
  title="Address Book" /> (1)

<menuitem name="menu-contact-friends"
  title="All Contact"
  action="contact.all"/> (2) (3) (4)

<menuitem name="menu-mail-inbox"
  tag-style="warning"/> (5)

  <menuitem name="menu-mail-important"
    tag-style="important"/> (6)
1 define a top-level menu with no parent
2 define a child menu item with parent
3 the display text of the menu item
4 the action (of type action-view) to execute
5 the get tag value from the given method
6 user the given static tag

The tag-style can be one of the:

  • default

  • important

  • success

  • warning

  • inverse

  • info

The menus are displayed to users with the following rules:

  • Don’t allow access to root menus by default: top menus are restricted by default, so roles/groups are needed in order to be displayed to users.

  • Allow access to all non-root menus by default: if submenus have no roles nor groups assigned, they are available to all. Or else, submenus are displayed to users belonging to the given groups/roles.