Class ContainerOptions<E>
java.lang.Object
io.jmix.ui.component.data.options.ContainerOptions<E>
- Type Parameters:
E
- entity type
- All Implemented Interfaces:
DataUnit
,ContainerDataUnit<E>
,EntityDataUnit
,EntityOptions<E>
,Options<E>
public class ContainerOptions<E>
extends Object
implements Options<E>, EntityOptions<E>, ContainerDataUnit<E>
Options based on a data container.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.meta.EntityOptions
EntityOptions.ValueChangeEvent<T>
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.Options
Options.OptionsChangeEvent<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected CollectionContainer<E>
protected E
protected EventHub
protected DataLoader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddOptionsChangeListener
(Consumer<Options.OptionsChangeEvent<E>> listener) Registers a new state change listener.protected void
protected void
protected void
boolean
containsItem
(E item) getState()
void
refresh()
Refreshes the source moving it to theBindingState.ACTIVE
statevoid
setSelectedItem
(E item) Set current item in the source.void
updateItem
(E item) Update an item in the collection if it is already there.
-
Field Details
-
container
-
loader
-
events
-
deferredSelectedItem
-
-
Constructor Details
-
ContainerOptions
-
-
Method Details
-
containerCollectionChanged
-
containerItemPropertyChanged
-
containerItemChanged
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
setSelectedItem
Description copied from interface:EntityOptions
Set current item in the source.- Specified by:
setSelectedItem
in interfaceEntityOptions<E>
- Parameters:
item
- the item to set
-
containsItem
- Specified by:
containsItem
in interfaceEntityOptions<E>
- Returns:
- true if the underlying collection contains an item with the specified ID
-
updateItem
Description copied from interface:EntityOptions
Update an item in the collection if it is already there.- Specified by:
updateItem
in interfaceEntityOptions<E>
-
refresh
public void refresh()Description copied from interface:EntityOptions
Refreshes the source moving it to theBindingState.ACTIVE
state- Specified by:
refresh
in interfaceEntityOptions<E>
-
getOptions
- Specified by:
getOptions
in interfaceOptions<E>
-
getState
-
addStateChangeListener
Description copied from interface:DataUnit
Registers a new state change listener.- Specified by:
addStateChangeListener
in interfaceDataUnit
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addValueChangeListener
- Specified by:
addValueChangeListener
in interfaceEntityOptions<E>
-
addOptionsChangeListener
- Specified by:
addOptionsChangeListener
in interfaceOptions<E>
-
getContainer
- Specified by:
getContainer
in interfaceContainerDataUnit<E>
-