Package io.jmix.flowui.facet.settings
Class ComponentSettingsManagerImpl
java.lang.Object
io.jmix.flowui.facet.settings.ComponentSettingsManagerImpl
- All Implemented Interfaces:
ComponentSettingsManager
@Component("flowui_ComponentSettingsManagerImpl")
public class ComponentSettingsManagerImpl
extends Object
implements ComponentSettingsManager
Implementation of
ComponentSettingsManager that applies, saves, and manages settings for components
using ComponentSettingsRegistry and UserSettingsCache.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComponentSettingsManagerImpl(ComponentSettingsRegistry settingsRegistry, UserSettingsCache userSettingsCache) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDataLoadingSettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Applies data loading settings fromUiComponentSettingsto provided components.voidapplySettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Applies settings fromUiComponentSettingsto provided components.voidsaveSettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Persists settings if they are changed orUiComponentSettings.isModified()returnstrue.
-
Field Details
-
settingsRegistry
-
userSettingsCache
-
-
Constructor Details
-
ComponentSettingsManagerImpl
public ComponentSettingsManagerImpl(ComponentSettingsRegistry settingsRegistry, UserSettingsCache userSettingsCache)
-
-
Method Details
-
applySettings
public void applySettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Description copied from interface:ComponentSettingsManagerApplies settings fromUiComponentSettingsto provided components.Note, component should have and id and
ComponentSettingsBinder. Otherwise, it will be skipped while applying settings. SeeDataGridSettingsBinderas an example.- Specified by:
applySettingsin interfaceComponentSettingsManager- Parameters:
components- components to apply settingscomponentSettings-UiComponentSettings
-
applyDataLoadingSettings
public void applyDataLoadingSettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Description copied from interface:ComponentSettingsManagerApplies data loading settings fromUiComponentSettingsto provided components.Note, component should have and id and
ComponentSettingsBinder. Otherwise, it will be skipped while applying settings. SeeDataGridSettingsBinderas an example.- Specified by:
applyDataLoadingSettingsin interfaceComponentSettingsManager- Parameters:
components- components to apply settingscomponentSettings-UiComponentSettings
-
saveSettings
public void saveSettings(Collection<com.vaadin.flow.component.Component> components, UiComponentSettings<?> componentSettings) Description copied from interface:ComponentSettingsManagerPersists settings if they are changed orUiComponentSettings.isModified()returnstrue.Note, component should have and id and
ComponentSettingsBinder. Otherwise, it will be skipped while saving settings. SeeDataGridSettingsBinderas an example.- Specified by:
saveSettingsin interfaceComponentSettingsManager- Parameters:
components- components to save settingscomponentSettings-UiComponentSettings
-