core.Actor (Actor) — amici1

# `core.Actor` (Actor)

`lino.core.actors.Actor`

The base class for all actors. Subclassed by `AbstractTable`, `Table`, `ChoiceList` and `Frame`.

known_values

  A dict of fieldname -> value pairs that specify “known values”.

  Requests will automatically be filtered to show only existing records with those values. This is like `filter`, but new instances created in this Table will automatically have these values set.

welcome_message_when_count

  Set this to an integer (e.g. 0) to tell Lino to make a generic welcome message “You have X items in Y” when the number of rows in this table is greater than the given integer.

The following class methods are None in the default implementation. Subclass can define them.

classmethod get_handle_name(self, ar)

  Most actors use the same UI handle for each request. But e.g. `lino_welfare.modlib.debts.models.PrintEntriesByBudget` and `lino_xl.lib.events.EventsByType` override this to implement dynamic columns depending on it’s master_instance.

classmethod get_welcome_messages(self, ar)

  If a method of this name is defined on an actor, then it must be a class method which takes an `ar` as single argument and returns or yields a list of welcome messages (messages to be displayed in the welcome block of `admin_main.html`).

  Note that this handler will be called independently of whether the user has permission to view the actor or not.

## Filter parameters