Search in sources :

Example 1 with EntityClearAction

use of io.jmix.ui.action.entitypicker.EntityClearAction 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

MetaClass (io.jmix.core.metamodel.model.MetaClass)1 Action (io.jmix.ui.action.Action)1 EntityClearAction (io.jmix.ui.action.entitypicker.EntityClearAction)1 EntityLookupAction (io.jmix.ui.action.entitypicker.EntityLookupAction)1