Bever is pre-alpha. The language, APIs, and packages will change in breaking ways between releases.Bever is pre-alpha. Expect breaking changes.Read more
Skip to content

Presentation ​

A Present block inside an entity tells the generated app how to show it: labels, list columns, the fields of each form, how editing opens, and how actions appear. It never changes what the API allows.

bev
Entity Task
    Field Title Text(200)
    Field Notes Text(4000)?
    Field Status Enum(ToDo, Done) = ToDo
    Field Assignee -> Identity?

    Present
        Label "Task"
        PluralLabel "Tasks"
        RecordLabel Title

        Field Notes
            Label "Internal notes"

        Listing
            Fields Title, Status, Assignee

        Details
            Fields Title, Status, Assignee, Notes

        Creating
            Mode Page
            Fields Title, Assignee

        Editing
            Mode Inline
            Fields Title, Status

        Actions
            Delete
                Confirm "Delete this task and its history?"

Everything is optional. Omitted settings keep the defaults described below.

Labels ​

SettingDefault
Label "Order"the entity name in words: SalesOrder becomes Sales order
PluralLabel "Orders"the label with its last word pluralized
RecordLabel Numberthe first Text field, otherwise the first other text, number, date, or enum field
Field DueDate + Label "Due"the field name in words: Due date

The record label names a record in page titles, pickers, breadcrumbs, and references from other records. The app never falls back to the record ID.

Surfaces ​

Listing, Details, Creating, and Editing each take Fields, an ordered list of fields to show. Without it, a surface shows every field in declaration order.

Creating and Editing also take a Mode:

ModeCreatingEditing
Pagea separate page (default)a separate page (default)
Modala dialog over the lista dialog over the list or detail page
Inlinenot alloweda form inside the list row
Noneno create controlno edit control

None removes the generated control only. The API action still exists for other clients.

A create form must include every required field that has no default; otherwise the server rejects the request.

Reference pickers ​

An Input inside Creating or Editing chooses how a relationship is picked:

bev
        Creating
            Input Customer
                Picker Modal
PickerUse when
Combobox (default)Any size of list: a searchable popover that loads 20 records at a time
DropdownShort lists: up to 50 records in a plain select; larger lists show a message instead of a truncated list
ModalA dialog with search, for a roomier choice

Search uses the target's picker SearchBy fields, or its record label when that is text. See Relationships.

Actions ​

Actions adjusts the buttons of the declared CRUD actions. List an action by verb and set any of:

SettingValuesDefault
Labelquoted textCreate, View, Edit, Delete
EmphasisDefault, Primary, DestructivePrimary for Create, Destructive for Delete
Confirmquoted textDelete asks for confirmation
PlaceNavigation, ListingToolbar, ListingRow, DetailsToolbarsee below
Ordera whole number0
Hiddentrue or falsefalse

Default places: Create in the ListingToolbar; Read in the Navigation (the sidebar) and each ListingRow; Update and Delete in each ListingRow and the DetailsToolbar.

bev
        Actions
            Read
                Place ListingRow           # do not list the entity in the sidebar
            Update
                Label "Change"
            Delete
                Hidden true

Hidden true removes the control and its page, not the permission.

Released under the Apache License 2.0. Documentation under CC BY 4.0.