Class DynAttrComponentGenerationStrategy
java.lang.Object
io.jmix.dynattrflowui.impl.factory.DynAttrComponentGenerationStrategy
- All Implemented Interfaces:
ComponentGenerationStrategy
,org.springframework.core.Ordered
- Direct Known Subclasses:
DynAttrPropertyFilterComponentGenerationStrategy
@Component("dynat_DynAttrComponentGenerationStrategy")
public class DynAttrComponentGenerationStrategy
extends Object
implements ComponentGenerationStrategy, org.springframework.core.Ordered
-
Field Summary
Modifier and TypeFieldDescriptionprotected Actions
protected org.springframework.context.ApplicationContext
protected AttributeDependencies
protected AttributeValidators
protected DatatypeRegistry
protected DynAttrMetadata
protected FormatStringsRegistry
protected Messages
protected Metadata
protected MsgBundleTools
protected AttributeOptionsLoader
protected UiComponents
protected ViewRegistry
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionDynAttrComponentGenerationStrategy
(Messages messages, UiComponents uiComponents, DynAttrMetadata dynamicModelMetadata, Metadata metadata, MsgBundleTools msgBundleTools, AttributeOptionsLoader optionsLoader, AttributeValidators attributeValidators, ViewRegistry viewRegistry, Actions actions, AttributeDependencies attributeDependencies, FormatStringsRegistry formatStringsRegistry, org.springframework.context.ApplicationContext applicationContext, DatatypeRegistry datatypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.AbstractField<?,
?> createBooleanField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.Component
createCollectionField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.Component
createComboBox
(ComponentGenerationContext context, AttributeDefinition attribute) com.vaadin.flow.component.Component
Creates a component according to the givenComponentGenerationContext
.protected com.vaadin.flow.component.Component
createComponentInternal
(ComponentGenerationContext context, MetaClass metaClass, String propertyName) protected com.vaadin.flow.component.Component
createDatatypeField
(ComponentGenerationContext context, AttributeDefinition attribute) protected TypedDateTimePicker<?>
createDateField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.AbstractField<?,
?> createEntityField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.Component
createEnumCollectionField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.Component
createEnumerationField
(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.AbstractField<?,
?> createNumberField
(AttributeType type, ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.Component
createStringField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Map
getLocalizedEnumerationMap
(AttributeDefinition attribute) int
getOrder()
protected void
initValuesSelectActionByAttribute
(MultiValueSelectAction<?> selectAction, AttributeDefinition attribute) protected void
setComboBoxOptionsLoader
(com.vaadin.flow.component.combobox.ComboBox lookupField, AttributeDefinition attribute, ContainerValueSource valueSource) protected void
setCustomDatatype
(TypedTextField field, AttributeDefinition attribute) protected void
setDescription
(HasTitle component, AttributeDefinition attribute) protected void
setEditable
(com.vaadin.flow.component.HasValueAndElement<?, ?> component, AttributeDefinition attribute) protected void
setLabel
(com.vaadin.flow.component.HasLabel component, AttributeDefinition attribute) protected void
setLookupActionScreen
(EntityLookupAction<?> lookupAction, AttributeDefinition attribute) protected void
setRequired
(HasRequired field, AttributeDefinition attribute) protected void
setValidators
(SupportsValidation<?> field, AttributeDefinition attribute) protected void
setValueChangedListeners
(com.vaadin.flow.component.HasValue component, AttributeDefinition attribute) protected void
setValueSource
(SupportsValueSource<?> field, ComponentGenerationContext context) protected <T extends HasActions & com.vaadin.flow.component.HasValue>
voidsetValuesPickerOptionsLoader
(T valuesPicker, AttributeDefinition attribute, ContainerValueSource valueSource) protected void
valueChangeListenerHandler
(com.vaadin.flow.component.Component source, AttributeDefinition attributeDefinition, Object oldValue, Object value)
-
Field Details
-
messages
-
uiComponents
-
dynamicModelMetadata
-
metadata
-
msgBundleTools
-
optionsLoader
-
attributeValidators
-
viewRegistry
-
actions
-
attributeDependencies
-
formatStringsRegistry
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
datatypeRegistry
-
-
Constructor Details
-
DynAttrComponentGenerationStrategy
@Autowired public DynAttrComponentGenerationStrategy(Messages messages, UiComponents uiComponents, DynAttrMetadata dynamicModelMetadata, Metadata metadata, MsgBundleTools msgBundleTools, AttributeOptionsLoader optionsLoader, AttributeValidators attributeValidators, ViewRegistry viewRegistry, Actions actions, AttributeDependencies attributeDependencies, FormatStringsRegistry formatStringsRegistry, org.springframework.context.ApplicationContext applicationContext, DatatypeRegistry datatypeRegistry)
-
-
Method Details
-
createComponent
Description copied from interface:ComponentGenerationStrategy
Creates a component according to the givenComponentGenerationContext
. If the strategy is not applicable to the given context it should return null value.- Specified by:
createComponent
in interfaceComponentGenerationStrategy
- Parameters:
context
- the context instance- Returns:
- created component
-
createComponentInternal
protected com.vaadin.flow.component.Component createComponentInternal(ComponentGenerationContext context, MetaClass metaClass, String propertyName) -
createDatatypeField
protected com.vaadin.flow.component.Component createDatatypeField(ComponentGenerationContext context, AttributeDefinition attribute) -
createCollectionField
protected com.vaadin.flow.component.Component createCollectionField(ComponentGenerationContext context, AttributeDefinition attribute) -
createEnumCollectionField
protected com.vaadin.flow.component.Component createEnumCollectionField(ComponentGenerationContext context, AttributeDefinition attribute) -
createStringField
protected com.vaadin.flow.component.Component createStringField(ComponentGenerationContext context, AttributeDefinition attribute) -
createEnumerationField
protected com.vaadin.flow.component.Component createEnumerationField(ComponentGenerationContext context, AttributeDefinition attribute) -
createComboBox
protected com.vaadin.flow.component.Component createComboBox(ComponentGenerationContext context, AttributeDefinition attribute) -
createBooleanField
protected com.vaadin.flow.component.AbstractField<?,?> createBooleanField(ComponentGenerationContext context, AttributeDefinition attribute) -
createDateField
protected TypedDateTimePicker<?> createDateField(ComponentGenerationContext context, AttributeDefinition attribute) -
createNumberField
protected com.vaadin.flow.component.AbstractField<?,?> createNumberField(AttributeType type, ComponentGenerationContext context, AttributeDefinition attribute) -
createEntityField
protected com.vaadin.flow.component.AbstractField<?,?> createEntityField(ComponentGenerationContext context, AttributeDefinition attribute) -
setValueSource
-
setValidators
-
setCustomDatatype
-
setValueChangedListeners
protected void setValueChangedListeners(com.vaadin.flow.component.HasValue component, AttributeDefinition attribute) -
valueChangeListenerHandler
protected void valueChangeListenerHandler(com.vaadin.flow.component.Component source, AttributeDefinition attributeDefinition, Object oldValue, Object value) -
setEditable
protected void setEditable(com.vaadin.flow.component.HasValueAndElement<?, ?> component, AttributeDefinition attribute) -
setLabel
protected void setLabel(com.vaadin.flow.component.HasLabel component, AttributeDefinition attribute) -
setDescription
-
setRequired
-
initValuesSelectActionByAttribute
protected void initValuesSelectActionByAttribute(MultiValueSelectAction<?> selectAction, AttributeDefinition attribute) -
getLocalizedEnumerationMap
-
setValuesPickerOptionsLoader
protected <T extends HasActions & com.vaadin.flow.component.HasValue> void setValuesPickerOptionsLoader(T valuesPicker, AttributeDefinition attribute, ContainerValueSource valueSource) -
setComboBoxOptionsLoader
protected void setComboBoxOptionsLoader(com.vaadin.flow.component.combobox.ComboBox lookupField, AttributeDefinition attribute, ContainerValueSource valueSource) -
setLookupActionScreen
protected void setLookupActionScreen(EntityLookupAction<?> lookupAction, AttributeDefinition attribute) -
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-