Entity-based autogenerated screens

The screens classes reference

class wefram.ui.screens.EntityListScreen

The automatically generating entity model’s list screen.

primary_field: Union[wefram.ui.screens.components.ProvEnums.types.EnumField, List[wefram.ui.screens.components.ProvEnums.types.EnumField]] = None

Defines the primary field. If the several fields needs to be placed next to each other - group them using list or tuple.

secondary_field: Union[wefram.ui.screens.components.ProvEnums.types.EnumField, List[wefram.ui.screens.components.ProvEnums.types.EnumField]] = None

Defines the secondary field . If the several fields needs to be placed next to each other - group them using list or tuple.

class wefram.ui.screens.EntityTableScreen

The automatically generating entity model’s list screen.

entity: str = None

The corresponding API-entity name for which this screen is for.

table_columns: List[wefram.ui.screens.components.ProvEnums.types.EnumField] = None

Defines columns whose will be present on the table screen. The each table column must be defined as :py:meth:~EnumField: class instance.

class wefram.ui.screens.EntityCardScreen

The automatically generating entity model’s card screen.

entity: str = None

The corresponding API-entity name for which this screen is for.

class wefram.ui.screens.EntityAdminScreen

The screen consists of both list (or table) and card.

entity: str = None

The corresponding API-entity name for which this screen is for.

enum_variant: Literal['list', 'table'] = 'list'

The variant how the listing screen will look like: as list or as table. Possible values are ‘list’ and ‘table’.

table_columns: List[wefram.ui.screens.components.ProvEnums.types.EnumField] = None

Defines columns whose will be present on the table screen (if the table variant has been selected). The each table column must be defined as EnumField() class instance.

primary_field: Union[wefram.ui.screens.components.ProvEnums.types.EnumField, List[wefram.ui.screens.components.ProvEnums.types.EnumField]] = None

Defines the primary field for the list variant of enum. If the several fields needs to be placed next to each other - group them using list or tuple.

secondary_field: Union[wefram.ui.screens.components.ProvEnums.types.EnumField, List[wefram.ui.screens.components.ProvEnums.types.EnumField]] = None

Defines the secondary field for the list variant of enum. If the several fields needs to be placed next to each other - group them using list or tuple.

The fields’ columns reference

class wefram.ui.screens.EnumField(field_name: str, field_type: Literal['string', 'number', 'boolean', 'icon', 'date', 'date_time', 'date_nice', 'date_time_nice'] = 'string', caption: Optional[Union[str, wefram.types.l10n.L10nStr]] = None, caption_hint: Optional[Union[str, wefram.types.l10n.L10nStr]] = None, textual: bool = False, null_text: Optional[Union[bool, str]] = None, value_visualize: Optional[dict] = None)

The column definition for the entity listing (enumerating) screen.

Parameters
  • field_type

    The type of the field or table column. This affects on how the corresponding value will be interpreted and shown to the user.

    Possible types are:

    • string - Just a textual string (default)

    • number - The number

    • boolean - Yes or No (will be presented as Yes-No image)

    • icon - Icon (the value will be interpreted as src url)

    • date - Date in the strict form

    • date_time - Date & time in the strict form

    • date_nice - The nice, textual format of the date

    • date_time_nice - The nice, textual format of the date & time

  • field_name – The name of the field, which must be the same as in the resulting data sent from backend to the frontend (the same as entity field name).

  • caption – The field caption (strongly recommends to fill up this property for the table variant of enumerations). Might be lazy localized string for the localization purposes.

  • caption_hint – If set, the field caption will be followed with the hint icon and the user will get the hint when moving mouse over the field caption hint

  • textual – If set to true - the several field type-based variants, like boolean, will be shown to the user textual, avoiding using of icons, images or etc.

  • null_text – Defines behaviour on when the field value is null or avoided in the response. If not set - nothing will be rendered to the user (nothing shown). If set to the boolean true - the textual dash (-) will be rendered. If set to some string value - this string value will be shown to the user instead of null.

  • value_visualize – The dictionary describing values and accordning textual representations. This allows to determine whether the raw value corresponds to the displayed textual value to the user.