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
FieldsModifier and TypeFieldDescriptionprotected Actionsprotected org.springframework.context.ApplicationContextprotected AttributeDependenciesprotected AttributeValidatorsprotected DatatypeRegistryprotected DynAttrMetadataprotected FormatStringsRegistryprotected Messagesprotected Metadataprotected MsgBundleToolsprotected AttributeOptionsLoaderprotected UiComponentsprotected ViewRegistryFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionDynAttrComponentGenerationStrategy(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.ComponentcreateCollectionField(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.ComponentcreateComboBox(ComponentGenerationContext context, AttributeDefinition attribute) com.vaadin.flow.component.ComponentCreates a component according to the givenComponentGenerationContext.protected com.vaadin.flow.component.ComponentcreateComponentInternal(ComponentGenerationContext context, MetaClass metaClass, String propertyName) protected com.vaadin.flow.component.ComponentcreateDatatypeField(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.ComponentcreateEnumCollectionField(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.ComponentcreateEnumerationField(ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.AbstractField<?,?> createNumberField(AttributeType type, ComponentGenerationContext context, AttributeDefinition attribute) protected com.vaadin.flow.component.ComponentcreateStringField(ComponentGenerationContext context, AttributeDefinition attribute) protected MapgetLocalizedEnumerationMap(AttributeDefinition attribute) intgetOrder()protected voidinitValuesSelectActionByAttribute(MultiValueSelectAction<?> selectAction, AttributeDefinition attribute) protected voidsetComboBoxOptionsLoader(com.vaadin.flow.component.combobox.ComboBox lookupField, AttributeDefinition attribute, ContainerValueSource valueSource) protected voidsetCustomDatatype(TypedTextField field, AttributeDefinition attribute) protected voidsetDescription(HasTitle component, AttributeDefinition attribute) protected voidsetEditable(com.vaadin.flow.component.HasValueAndElement<?, ?> component, AttributeDefinition attribute) protected voidsetLabel(com.vaadin.flow.component.HasLabel component, AttributeDefinition attribute) protected voidsetLookupActionScreen(EntityLookupAction<?> lookupAction, AttributeDefinition attribute) protected voidsetRequired(HasRequired field, AttributeDefinition attribute) protected voidsetValidators(SupportsValidation<?> field, AttributeDefinition attribute) protected voidsetValueChangedListeners(com.vaadin.flow.component.HasValue component, AttributeDefinition attribute) protected voidsetValueSource(SupportsValueSource<?> field, ComponentGenerationContext context) protected <T extends HasActions & com.vaadin.flow.component.HasValue>
voidsetValuesPickerOptionsLoader(T valuesPicker, AttributeDefinition attribute, ContainerValueSource valueSource) protected voidvalueChangeListenerHandler(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:ComponentGenerationStrategyCreates a component according to the givenComponentGenerationContext. If the strategy is not applicable to the given context it should return null value.- Specified by:
createComponentin 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:
getOrderin interfaceorg.springframework.core.Ordered
-