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
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.StateChangeEventNested 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
FieldsModifier and TypeFieldDescriptionprotected final InstanceContainer<E>protected booleanprotected EventBusprotected MetaPropertyPathprotected Stringprotected BindingState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registrationcom.vaadin.flow.shared.RegistrationRegisters a new state change listener.com.vaadin.flow.shared.RegistrationaddValueChangeListener(Consumer<ValueSource.ValueChangeEvent<V>> listener) Registers a new value change listener.protected booleanprotected voidprotected voidprotected Collection<? extends V>copyPropertyCollection(Collection<? extends V> propertyValue) protected DataContextprotected MetaPropertygetItem()getState()getType()getValue()protected booleanbooleanprotected booleanbooleanvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetDataModelSecurityEnabled(boolean enabled) Sets data model security enabled for data binding.protected voidsetState(BindingState state) voidprotected voidupdateMasterRefs(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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getEntityMetaClass
- Specified by:
getEntityMetaClassin interfaceEntityDataUnit- Returns:
MetaClassof an entity contained in the source
-
getMetaPropertyPath
- Specified by:
getMetaPropertyPathin interfaceEntityValueSource<E,V> - Returns:
- property path
-
getItem
- Specified by:
getItemin interfaceEntityValueSource<E,V> - Returns:
- entity
-
isDataModelSecurityEnabled
public boolean isDataModelSecurityEnabled()- Specified by:
isDataModelSecurityEnabledin interfaceEntityValueSource<E,V> - Returns:
- true if data model security check is required on data binding
-
getValue
- Specified by:
getValuein interfaceValueSource<E>
-
setValue
- Specified by:
setValuein interfaceValueSource<E>
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfaceValueSource<E>
-
getType
-
getState
-
addInstanceChangeListener
public com.vaadin.flow.shared.Registration addInstanceChangeListener(Consumer<EntityValueSource.InstanceChangeEvent<E>> listener) - Specified by:
addInstanceChangeListenerin interfaceEntityValueSource<E,V>
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnitRegisters a new state change listener.- Specified by:
addStateChangeListenerin 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:ValueSourceRegisters a new value change listener.- Specified by:
addValueChangeListenerin 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
-