Package io.jmix.core.entity.annotation
Annotation Interface LookupField
Defines which UI component is used for selecting references to an entity.
On an entity class, applies whenever a reference to this entity is selected in generated UI
(form fields, property filters, etc.). Propagates to subclasses. On a reference attribute,
applies to this attribute only and takes precedence over both the class-level annotation on
the referenced entity and the jmix.ui.component.entity-field-fqn /
entity-field-actions application properties. The application properties in turn take
precedence over the class-level annotation.
With LookupType.DROPDOWN and no itemsQuery(), all instances are loaded
eagerly — suitable for small dictionary entities only. For larger tables configure lazy
loading via itemsQuery(). Items are loaded through DataManager, so
row-level security constraints apply.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]Optional list of picker action ids registered in the UI module's actions registry, for example:Optional query configuration for lazy loading ofLookupType.DROPDOWNitems.
-
Element Details
-
type
LookupType type -
actions
String[] actionsOptional list of picker action ids registered in the UI module's actions registry, for example:@LookupField(type = LookupType.DROPDOWN, actions = {"entity_lookup", "entity_open"})- Default:
{}
-
itemsQuery
LookupItemsQuery itemsQueryOptional query configuration for lazy loading ofLookupType.DROPDOWNitems. Ignored (with a warning in the log) forLookupType.VIEW.- Default:
@io.jmix.core.entity.annotation.LookupItemsQuery
-