Package io.jmix.ui.component.impl
Class LookupScreenFacetImpl<E,S extends Screen & LookupScreen<E>>
java.lang.Object
io.jmix.ui.component.impl.AbstractFacet
io.jmix.ui.component.impl.AbstractScreenFacet<S>
io.jmix.ui.component.impl.AbstractEntityAwareScreenFacet<E,S>
io.jmix.ui.component.impl.LookupScreenFacetImpl<E,S>
- All Implemented Interfaces:
EntityAwareScreenFacet<E>
,Facet
,LookupScreenFacet<E,
,S> ScreenFacet<S>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class LookupScreenFacetImpl<E,S extends Screen & LookupScreen<E>>
extends AbstractEntityAwareScreenFacet<E,S>
implements LookupScreenFacet<E,S>
-
Field Summary
Modifier and TypeFieldDescriptionprotected Consumer<Collection<E>>
protected Predicate<LookupScreen.ValidationContext<E>>
protected Function<Collection<E>,
Collection<E>> Fields inherited from class io.jmix.ui.component.impl.AbstractEntityAwareScreenFacet
container, entityClass, entityPicker, listComponent
Fields inherited from class io.jmix.ui.component.impl.AbstractScreenFacet
actionId, afterCloseListeners, afterShowListeners, applicationContext, buttonId, openMode, optionsProvider, properties, screen, screenClass, screenConfigurer, screenId
Fields inherited from class io.jmix.ui.component.impl.AbstractFacet
id, owner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
protected LookupBuilder<E>
createLookupBuilder
(Frame owner) protected S
createScreen
(LookupBuilder<E> builder) void
setSelectHandler
(Consumer<Collection<E>> selectHandler) Sets select handler for the lookup screen.void
setSelectValidator
(Predicate<LookupScreen.ValidationContext<E>> selectValidator) Sets select validator for the lookup screen.void
setTransformation
(Function<Collection<E>, Collection<E>> transformation) Sets code to transform entities after selection.show()
Shows and returns screen.Methods inherited from class io.jmix.ui.component.impl.AbstractEntityAwareScreenFacet
getContainer, getEntityClass, getEntityPicker, getListComponent, setContainer, setEntityClass, setEntityPicker, setListComponent
Methods inherited from class io.jmix.ui.component.impl.AbstractScreenFacet
addAfterCloseEventListener, addAfterShowEventListener, applyScreenConfigurer, getActionTarget, getButtonTarget, getOpenMode, getOptionsProvider, getProperties, getScreenClass, getScreenConfigurer, getScreenId, getScreenOptions, initScreenListeners, injectScreenProperties, internalRemoveAfterCloseEventListener, internalRemoveAfterShowEventListener, setActionTarget, setApplicationContext, setButtonTarget, setOpenMode, setOptionsProvider, setOwner, setProperties, setScreenClass, setScreenConfigurer, setScreenId, subscribe, subscribeOnAction, subscribeOnButton
Methods inherited from class io.jmix.ui.component.impl.AbstractFacet
getEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface io.jmix.ui.component.EntityAwareScreenFacet
getContainer, getEntityClass, getEntityPicker, getListComponent, setContainer, setEntityClass, setEntityPicker, setListComponent
Methods inherited from interface io.jmix.ui.component.ScreenFacet
addAfterCloseEventListener, addAfterShowEventListener, getActionTarget, getButtonTarget, getOpenMode, getOptionsProvider, getProperties, getScreenClass, getScreenConfigurer, getScreenId, setActionTarget, setButtonTarget, setOpenMode, setOptionsProvider, setProperties, setScreenClass, setScreenConfigurer, setScreenId
-
Field Details
-
selectHandler
-
selectValidator
-
transformation
-
-
Constructor Details
-
LookupScreenFacetImpl
public LookupScreenFacetImpl()
-
-
Method Details
-
setSelectHandler
Description copied from interface:LookupScreenFacet
Sets select handler for the lookup screen.- Specified by:
setSelectHandler
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>>
-
getSelectHandler
- Specified by:
getSelectHandler
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>> - Returns:
- lookup screen select handler
-
setSelectValidator
public void setSelectValidator(@Nullable Predicate<LookupScreen.ValidationContext<E>> selectValidator) Description copied from interface:LookupScreenFacet
Sets select validator for the lookup screen.- Specified by:
setSelectValidator
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>>
-
getSelectValidator
- Specified by:
getSelectValidator
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>> - Returns:
- lookup screen select validator
-
setTransformation
Description copied from interface:LookupScreenFacet
Sets code to transform entities after selection.Applied only if either field or container or listComponent is assigned.
- Specified by:
setTransformation
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>>
-
getTransformation
- Specified by:
getTransformation
in interfaceLookupScreenFacet<E,
S extends Screen & LookupScreen<E>> - Returns:
- selected entities transformation
-
create
- Specified by:
create
in interfaceScreenFacet<E>
- Returns:
- new screen instance
-
show
Description copied from interface:ScreenFacet
Shows and returns screen.- Specified by:
show
in interfaceScreenFacet<E>
-
createScreen
-
createLookupBuilder
-