Search in sources :

Example 6 with EntityLookupAction

use of io.jmix.ui.action.entitypicker.EntityLookupAction in project jmix by jmix-framework.

the class QueryParameterEditor method createEntityPicker.

protected EntityPicker createEntityPicker() {
    MetaClass metaClass = entityMetaClassField.getValue();
    EntityPicker entityPicker = uiComponents.create(EntityPicker.class);
    entityPicker.setMetaClass(metaClass);
    EntityLookupAction pickerLookupAction = (EntityLookupAction) actions.create(EntityLookupAction.ID);
    entityPicker.addAction(pickerLookupAction);
    Action entityClearAction = actions.create(EntityClearAction.ID);
    entityPicker.addAction(entityClearAction);
    return entityPicker;
}
Also used : Action(io.jmix.ui.action.Action) EntityClearAction(io.jmix.ui.action.entitypicker.EntityClearAction) EntityLookupAction(io.jmix.ui.action.entitypicker.EntityLookupAction) MetaClass(io.jmix.core.metamodel.model.MetaClass) EntityLookupAction(io.jmix.ui.action.entitypicker.EntityLookupAction)

Aggregations

EntityLookupAction (io.jmix.ui.action.entitypicker.EntityLookupAction)6 MetaClass (io.jmix.core.metamodel.model.MetaClass)4 EntityClearAction (io.jmix.ui.action.entitypicker.EntityClearAction)4 ContainerValueSource (io.jmix.ui.component.data.value.ContainerValueSource)2 Range (io.jmix.core.metamodel.model.Range)1 UiEntityAttributeContext (io.jmix.ui.accesscontext.UiEntityAttributeContext)1 UiEntityContext (io.jmix.ui.accesscontext.UiEntityContext)1 Action (io.jmix.ui.action.Action)1 ValueSource (io.jmix.ui.component.data.ValueSource)1 MapScreenOptions (io.jmix.ui.screen.MapScreenOptions)1