Skip to content

View Descriptors

View descriptors are YAML files that define how an entity is displayed and behaves in the user interface. They remove the need to write ZUL views manually for standard CRUD operations by delegating configuration to the Dynamia Tools descriptor engine.


<module>/ui/src/main/resources/META-INF/descriptors/

In some cases, they can also be placed in core/ when the descriptor does not depend on UI components (for example, *Json.yml).


Every descriptor starts with a header that identifies the view type and the associated entity:

view: <type> # View type (required)
id: <identifier> # Unique ID (optional, defaults to filename)
beanClass: com.example.Entity # Entity Java class (required in most cases)
controller: com.example.Controller # Custom CrudController (optional)
customizer: com.example.Customizer # Form customizer (optional)
autofields: false # If true, engine generates fields automatically

TypeFile SuffixDescription
crud*Crud.ymlFull view (table + form integrated)
form*Form.ymlCreate/edit form
table*Table.ymlListing table
entitypicker*Picker.ymlEntity selector for reference fields
entityfilters*Filters.ymlSearch filters for table or CRUD
export*Export.ymlFields to export (Excel, CSV, etc.)
config*Config.ymlModule configuration parameters form
json*Json.ymlJSON representation of the entity (for APIs, webhooks, etc.)
tree*Tree.ymlTree view for hierarchical entities

Defines the fields shown in the view. Each field is named after the Java entity attribute. If left empty (name:), default engine values are used.

fields:
name: # Simple field, uses default label and type
price:
label: Sale Price # Custom label
description: Only values >= 0 # Helper text below field
component: textbox # Explicit UI component
required: true # Required field
visible: false # Hide field (useful for undesired inherited fields)
params:
span: 2 # Occupies 2 layout columns
span-sm: 12 # Full width on small screens
readonly: true # Read-only
multiline: true # Textarea (for strings)
height: 100px # Textarea height
placeholder: Type here... # Placeholder text
format: '#,##0.##' # Numeric format
constraint: 'no negative: only positive values' # Validation
newRow: true # Force new row
style: 'color: red' # Inline CSS
sclass: orange lighten-5 # CSS class
width: 100px # Component width

Use dot notation. The engine resolves navigation automatically:

fields:
manufacturer.name: # Accesses item.getManufacturer().getName()
label: Manufacturer
contactData.email:
label: Email
city.department.country.name:
label: Country

ComponentDescription
textboxSimple text box
intboxNumeric box for integers
spinnerNumeric spinner with range validation
comboboxDropdown list
entitypickerEntity selector with search (reference to another entity)
entityrefpickerEntity selector by reference field (foreign key by non-ID field)
entityreflabelLabel that shows the name of an entity referenced by ID
crudviewEmbedded CRUD table (for @OneToMany collections/relations)
coollabelComposite label with image, title, subtitle, and description
entityfileImageImage preview stored in entityfile
linkTable cell as a link that triggers an action
enumiconimageShows an icon or CSS class based on enum value
printerComboboxSystem printer selector
cuentacontablepickerAccounting account selector with code binding
providermultipickerboxMulti-selector fed by a Spring Provider

coollabel — Composite card with image and text:

products:
component: coollabel
params:
header:
width: 450px
bindings:
imageURL: photoURL # Entity property containing image URL
title: name # Main title
subtitle: lineName # Subtitle
description: type.name # Description (bottom line)
tooltiptext: description # Tooltip on hover

entityfileImage — Uploaded image preview:

photoPreview1:
label: Preview
component: entityfileImage
params:
bind: photo1
thumbnail: true
thumbnailWidth: 100
thumbnailHeight: 100
style: 'max-width: 100px; max-height: 100px'

crudview — Embedded CRUD table for collections:

subitems:
component: crudview
features:
component: crudview
params:
controller: com.example.FeatureItemController # Specific controller

entityreflabel — Reference label by ID:

salesTaxId:
label: Tax
component: entityreflabel
params:
header:
width: 100px

entityrefpicker — Selector by non-ID reference field:

identificationTypeId:
label: Type
component: entityrefpicker
required: true
params:
entityAlias: IdentificationType

link — Link that triggers an action:

serialDesc:
label: Serial
component: link
action: ViewSerialsDM # Registered action name
params:
header:
align: center

enumiconimage — Icon based on enum value:

movement.type:
label: Type
component: enumiconimage
params:
iconsNamesValues:
- up|text-success # value|css-class
- down|text-danger
header:
align: center

providermultipickerbox — Multi-selector from Provider:

responsibilities:
component: providermultipickerbox
params:
className: com.example.ResponsibilityProvider
idField: code
nameField: name

cuentacontablepicker — Accounting account selector:

accountingCode:
label: Income Account
component: cuentacontablepicker
params:
bindings:
codigo: accountingCode # Maps picker's 'codigo' to entity 'accountingCode'

Fields in table and entityfilters views support per-column style settings:

totalStock:
label: Stock
params:
converter: converters.Decimal
header:
align: center # Header alignment: left | center | right
width: 120px # Fixed column width
sclass: green color-white # Header CSS classes
cell:
sclass: green lighten-5 # Data cell CSS classes
footer:
function: sum # Aggregate function: sum | count | avg | max | min
functionConverter: converters.Decimal

converter transforms values when rendering in tables:

ConverterDescription
converters.CurrencyCurrency format with symbol and separators
converters.CurrencySimpleCurrency without symbol
converters.DecimalDecimal number with separators
converters.DateFormatted date (no time)
converters.DateTimeFormatted date and time

Configures form column count:

layout:
columns: 4 # Number of grid columns (default varies by view type)

Groups form fields into collapsible or labeled sections:

groups:
salesConfiguration: # Group ID (used as i18n key by default)
label: Sales Configuration # Visible label (optional; generated from ID if omitted)
collapse: true # Group collapsed by default
fields:
- minSalePrice
- salePrice2
- sellable
- allowsDiscounts
photos:
label: Images and Video
collapse: true
fields: [ photo1, photoPreview1, photo2, photoPreview2 ] # Compact list syntax

Note: Fields listed in groups are removed from default position and rendered in the group section.


Controls availability and attributes of standard CRUD actions:

actions:
FindAction:
attributes:
searchFields: [ code, name, reference ] # Fields used by quick search
NewAction:
enabled: false # Disable action
EditAction:
enabled: false
DeleteAction:
enabled: false
FilterAction:
enabled: false
ExportAction:
enabled: false
ExportCSVAction:
enabled: false
ImportThirdPartiesRef: # Custom actions can also be controlled here
enabled: false

Global view parameters:

params:
orderBy: name # Default sort field
pageSize: 50 # Records per page
span: true # Table uses full available width
sizedByContent: true # Columns fit content
writable: true # Inline editable table (for embedded tables)
visibleActions: 15 # Number of visible toolbar actions
parameterClass: tools.dynamia.modules.saas.jpa.AccountParameter # For config views

The *Crud.yml descriptor combines table and form in one view. It only needs beanClass and optionally a custom controller. The engine automatically uses the matching *Form.yml and *Table.yml.

Example: ItemInventarioCrud.yml

view: crud
beanClass: com.dynamiasoluciones.modules.inventario.domain.ItemInventario
controller: com.dynamiasoluciones.modules.inventario.ui.controllers.ItemInventarioCrudController
autofields: false
actions:
FindAction:
attributes:
searchFields: [ code, name, reference, barCode, mainLine.name, type.name ]
ExportAction:
enabled: false
ExportCSVAction:
enabled: false
params:
visibleActions: 15

Example: ClienteCrud.yml

view: crud
beanClass: com.dynamiasoluciones.modules.ventas.domain.Cliente
controller: com.dynamiasoluciones.modules.ventas.ui.controllers.ClienteCrudController
autofields: false
actions:
ImportThirdPartiesRef:
enabled: false
FindAction:
attributes:
searchFields: [identification, firstName, lastName]

Defines editable fields and layout for create/edit form.

Typical structure:

view: form
beanClass: com.example.Entity
customizer: com.example.EntityFormCustomizer # Dynamic UI logic (optional)
autofields: false
layout:
columns: 4
fields:
name:
params:
span: 2
price:
params:
format: '#,##0.##'
constraint: 'no negative: only positive values'
description:
params:
span: 4
multiline: true
height: 100px
groups:
configuration:
collapse: true
fields:
- active
- visible

Defines visible columns in CRUD listing table.

Fragment from ItemInventarioTable.yml:

view: table
beanClass: com.dynamiasoluciones.modules.inventario.domain.ItemInventario
autofields: false
fields:
products:
component: coollabel
params:
header:
width: 450px
bindings:
imageURL: photoURL
title: name
subtitle: lineName
description: type.name
salePrice:
params:
converter: converters.Currency
header:
align: right
sclass: orange color-white
cell:
sclass: orange lighten-5
params:
orderBy: name
pageSize: 50
span: true
sizedByContent: true

entitypicker Descriptor — Entity Selector

Section titled “entitypicker Descriptor — Entity Selector”

Used when a form needs to select an entity from a search popup.

Example: ItemInventarioPicker.yml

view: entitypicker
beanClass: com.dynamiasoluciones.modules.inventario.domain.ItemInventario
autofields: false
fields:
code:
name:
reference:
salePrice:
params:
converter: converters.CurrencySimple
searcheable: false
header:
align: right

Example: ClientePicker.yml

view: entitypicker
beanClass: com.dynamiasoluciones.modules.ventas.domain.Cliente
autofields: false
fields:
identification:
firstName:
lastName:
params:
sizedByContent: true

searcheable: false prevents the engine from applying search filters on that field.


entityfilters Descriptor — Search Filters

Section titled “entityfilters Descriptor — Search Filters”

Defines fields available as filters in listing view. Fields are also rendered as columns in filtered result table.

view: entityfilters
beanClass: com.dynamiasoluciones.modules.inventario.domain.ItemInventario
autofields: false
fields:
name:
mainLine:
totalStock:
label: Stock
params:
converter: converters.Decimal
header:
align: center
style: "background-color: maroon; color: white"
footer:
function: sum
functionConverter: converters.Decimal
photo:
params:
filterCustomizer: com.example.ItemPhotoFilterCustomizer # Custom filter logic
params:
orderBy: name

Defines fields included when exporting an entity to Excel or other formats:

view: export
beanClass: com.dynamiasoluciones.modules.ventas.domain.Cliente
autofields: false
fields:
identification:
firstName:
lastName:
city.name:
label: City
city.department.country.name:
label: Country
creationDate:
creator:

config Descriptor — Module Configuration

Section titled “config Descriptor — Module Configuration”

Lets you define a form for module configuration parameters. Values are stored as AccountParameter.

id: VentasConfig
view: config
fields:
MaxQuickSaleValue:
label: Maximum Quick Sale Value
component: textbox
params:
cacheable: true # Value is cached for better performance
DefaultCustomerId:
label: Default Customer Identification
component: entitypicker
params:
entityClass: com.example.Cliente
entityProperty: identificacion
cacheable: true
params:
parameterClass: tools.dynamia.modules.saas.jpa.AccountParameter
layout:
columns: 4

Defines fields serialized when generating JSON representation of an entity (for webhooks, integrations, internal APIs):

view: json
beanClass: com.dynamiasoluciones.modules.inventario.domain.ItemInventario
autofields: false
fields:
name:
code:
reference:
salePrice:
estimatedCost:
active:

For hierarchical entities (parent-child). Engine renders an expandable tree.

view: tree
beanClass: com.dynamiasoluciones.modules.inventario.domain.LineaInventario
autofields: false
fields:
name:
label: Lines
params:
header:
width: 350px
active:
label: Active
photo:
label: Photo
component: entityfileImage

A file can define an id to be referenced explicitly from code or another descriptor, instead of using filename as identifier:

id: customerBasicForm
view: form
autofields: false
fields:
identification:
component: textbox
required: true
firstName:
component: textbox
required: true
layout:
columns: 2

Embedded tables inside forms can allow direct cell editing:

view: table
beanClass: com.example.StickerItem
autofields: false
fields:
code:
params:
header:
width: 100px
quantity:
component: intbox
params:
width: 99%
header:
width: 80px
params:
writable: true # Enables inline cell editing

Table Without beanClass (No Associated Entity)

Section titled “Table Without beanClass (No Associated Entity)”

When a table shows data from a ViewModel or dynamic data source, beanClass can be omitted:

view: table
id: itemMovementsTable
autofields: false
fields:
movement.type:
label: Type
movement.creationTimestamp:
label: Date
params:
converter: converters.DateTime
realQuantity:
label: Qty
params:
nullValue: none # Alternative text when value is null

PropertyLevelDescription
labelfieldVisible field label
descriptionfieldHelper text / hint below field
componentfieldUI component to use
requiredfieldRequired field (true/false)
visiblefieldVisibility (true/false)
actionfieldAction to execute (for component: link)
classfieldEntity Java class (for entitypicker without beanClass)
params.spanparamsNumber of layout columns occupied
params.span-smparamsColumns in small screens
params.readonlyparamsNon-editable field
params.multilineparamsShow as textarea
params.heightparamsTextarea height
params.widthparamsComponent width
params.placeholderparamsField placeholder text
params.formatparamsNumeric formatting pattern
params.constraintparamsZK validation rule
params.newRowparamsForce new layout row
params.styleparamsInline CSS applied to component
params.sclassparamsCSS classes applied to component
params.converterparamsConverter to transform displayed value
params.searcheableparamsInclude/exclude from search engine (default: true)
params.nullValueparamsAlternative text when value is null
params.popupWidthparamsSelection popup width (for example, 200%)
params.automodelparamsAutomatic combobox model loading
params.imageOnlyparamsOnly allows image upload (for entityfile)
params.sharedparamsImage shared between records (without duplicating files)
params.imageMaxHeightparamsMaximum image height on upload
params.imageMaxWidthparamsMaximum image width on upload
params.imageAutoJpgparamsAutomatically convert upload to JPG
params.thumbnailparamsShow as thumbnail (for entityfileImage)
params.thumbnailWidthparamsThumbnail width
params.thumbnailHeightparamsThumbnail height
params.bindparamsName of linked entityfile field for preview
params.cacheableparamsConfiguration parameter cached in memory
params.entityClassparamsEntity class to select in entitypicker
params.entityPropertyparamsEntity property used as selected value
params.entityAliasparamsEntity type alias for entityrefpicker
params.bindingsparamsComponent fields to entity properties mapping
params.classNameparamsProvider class for providermultipickerbox
params.idFieldparamsItem ID field in providermultipickerbox
params.nameFieldparamsItem name field in providermultipickerbox
params.iconsNamesValuesparams`value
params.filterCustomizerparamsCustomizer class for custom filter logic
header.alignheaderColumn header alignment: left, center, right
header.widthheaderFixed column width
header.sclassheaderHeader CSS classes
header.styleheaderHeader inline CSS
cell.sclasscellData cell CSS classes
footer.functionfooterColumn aggregate function
footer.functionConverterfooterConverter applied to aggregate result