Package io.jmix.flowui.data.value
Class ContainerValueSource<E,V>
java.lang.Object
io.jmix.flowui.data.value.ContainerValueSource<E,V>
- All Implemented Interfaces:
DataUnit
,EntityDataUnit
,EntityValueSource<E,
,V> HasType<V>
,ValueSource<V>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
BufferedContainerValueSource
public class ContainerValueSource<E,V>
extends Object
implements EntityValueSource<E,V>, org.springframework.context.ApplicationContextAware
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.flowui.data.EntityValueSource
EntityValueSource.InstanceChangeEvent<E>
Nested classes/interfaces inherited from interface io.jmix.flowui.data.ValueSource
ValueSource.ValueChangeEvent<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final InstanceContainer<E>
protected boolean
protected EventBus
protected MetaPropertyPath
protected String
protected BindingState
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
com.vaadin.flow.shared.Registration
Registers a new state change listener.com.vaadin.flow.shared.Registration
addValueChangeListener
(Consumer<ValueSource.ValueChangeEvent<V>> listener) Registers a new value change listener.protected boolean
protected void
protected void
protected Collection<? extends V>
copyPropertyCollection
(Collection<? extends V> propertyValue) protected DataContext
protected MetaProperty
getItem()
getState()
getType()
getValue()
protected boolean
boolean
protected boolean
boolean
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setDataModelSecurityEnabled
(boolean enabled) Sets data model security enabled for data binding.protected void
setState
(BindingState state) void
protected void
updateMasterRefs
(V value)
-
Field Details
-
container
-
metaPropertyPath
-
property
-
state
-
events
-
dataModelSecurityEnabled
protected boolean dataModelSecurityEnabled
-
-
Constructor Details
-
ContainerValueSource
-
-
Method Details
-
setDataModelSecurityEnabled
public void setDataModelSecurityEnabled(boolean enabled) Sets data model security enabled for data binding.
Caller may set false in order to disable built-in security check on data binding.- Parameters:
enabled
- enabled flag
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
getMetaPropertyPath
- Specified by:
getMetaPropertyPath
in interfaceEntityValueSource<E,
V> - Returns:
- property path
-
getItem
- Specified by:
getItem
in interfaceEntityValueSource<E,
V> - Returns:
- entity
-
isDataModelSecurityEnabled
public boolean isDataModelSecurityEnabled()- Specified by:
isDataModelSecurityEnabled
in interfaceEntityValueSource<E,
V> - Returns:
- true if data model security check is required on data binding
-
getValue
- Specified by:
getValue
in interfaceValueSource<E>
-
setValue
- Specified by:
setValue
in interfaceValueSource<E>
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceValueSource<E>
-
getType
-
getState
-
addInstanceChangeListener
public com.vaadin.flow.shared.Registration addInstanceChangeListener(Consumer<EntityValueSource.InstanceChangeEvent<E>> listener) - Specified by:
addInstanceChangeListener
in interfaceEntityValueSource<E,
V>
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) 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
public com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<ValueSource.ValueChangeEvent<V>> listener) Description copied from interface:ValueSource
Registers a new value change listener.- Specified by:
addValueChangeListener
in interfaceValueSource<E>
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
setState
-
containerItemChanged
-
containerItemPropertyChanged
-
canUpdateMasterRefs
protected boolean canUpdateMasterRefs() -
updateMasterRefs
-
copyPropertyCollection
@Nullable protected Collection<? extends V> copyPropertyCollection(@Nullable Collection<? extends V> propertyValue) -
getDataContext
-
getInverseProperty
-
getContainer
-
isCollectionPropertyType
protected boolean isCollectionPropertyType() -
isEqualCollectionValue
-