Introduction to actions¶
This section tries to explain everything you need to know about actions.
Actions are always linked to an actor. Each actor has its list of actions.
Standard actions are installed automatically on every table when Lino starts
up. They are defined in
Application developers can define new Writing custom actions, or also override standard actions with their own custom actions.
Some action attributes include:
label : the text to place on the button or menu item
help_text : the text to appear as tooltip when the mouse is over that button
handler function : the function to call when the action is invoked
permission requirements : for whom and under which conditions this action is available
Some actions cause a new window to open on the client, others don't.
This is specified by the
DeleteSelected action is visible in the toolbars of
the grid and the detail windows and in the context menu on a grid row.
A same action instance can be shared by many actors. For example the
DeleteSelected action is
For example in the
setup_menu method in the Polls tutorial) you say:
def setup_menu(site, ui, user_type, main): m = main.add_menu("polls", "Polls") m.add_action('polls.Questions') m.add_action('polls.Choices')
add_action method of
lino.core.menus.Menu is smart enough to understand
that if you specify a Table, you mean in fact that table's default