tamaki.mes.utils.enumListToDropdown
Description
Converts a list of Java enums into the {'value', 'label'} format used by Perspective dropdown
components. For each enum, the option's value is enum.name() and the label is enum.toString().
Syntax
tamaki.mes.utils.enumListToDropdown(el)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
el | List | False | The list of Java enums to format. |
Returns
A List of {'value', 'label'} dictionaries.
Code Examples
# In a binding script transform: turn a list of Java enums into dropdown options
return tamaki.mes.utils.enumListToDropdown(value) if value is not None else []