Package io.jmix.dynattrui.impl.factory
Class DynAttrComponentGenerationStrategy
java.lang.Object
io.jmix.dynattrui.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 DynAttrMetadata
protected FormatStringsRegistry
protected Messages
protected Metadata
protected MsgBundleTools
protected AttributeOptionsLoader
protected ScreensHelper
protected UiComponents
protected WindowConfig
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, WindowConfig windowConfig, ScreensHelper screensHelper, Actions actions, AttributeDependencies attributeDependencies, FormatStringsRegistry formatStringsRegistry, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected Field
createBooleanField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createClassField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createCollectionField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createComboBox
(ComponentGenerationContext context, AttributeDefinition attribute) Creates a component according to the givenComponentGenerationContext
.protected Component
createComponentInternal
(ComponentGenerationContext context, MetaClass metaClass, String propertyName) protected Component
createDatatypeField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createDateField
(ComponentGenerationContext context, AttributeDefinition attribute) protected EntityPicker
createEntityField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createEnumerationField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Field
createNumberField
(ComponentGenerationContext context, AttributeDefinition attribute) protected Component
createStringField
(ComponentGenerationContext context, AttributeDefinition attribute) getLocalizedEnumerationMap
(AttributeDefinition attribute) int
getOrder()
protected void
initValuesSelectActionByAttribute
(ValuesSelectAction selectAction, AttributeDefinition attribute) protected void
setCaption
(Component.HasCaption component, AttributeDefinition attribute) protected void
setComboBoxOptionsLoader
(ComboBox lookupField, AttributeDefinition attribute, ContainerValueSource valueSource) protected void
setCustomDatatype
(TextField field, AttributeDefinition attribute) protected void
setEditable
(Component.Editable component, AttributeDefinition attribute) protected void
setLookupActionScreen
(EntityLookupAction lookupAction, AttributeDefinition attribute) protected void
setRequired
(Field<?> field, AttributeDefinition attribute) protected void
setValidators
(Field field, AttributeDefinition attribute) protected void
setValueChangedListeners
(HasValue component, AttributeDefinition attribute) protected void
setValueSource
(Field field, ComponentGenerationContext context) protected void
setValuesPickerOptionsLoader
(ValuesPicker valuesPicker, AttributeDefinition attribute, ContainerValueSource valueSource)
-
Field Details
-
messages
-
uiComponents
-
dynamicModelMetadata
-
metadata
-
msgBundleTools
-
optionsLoader
-
attributeValidators
-
windowConfig
-
screensHelper
-
actions
-
attributeDependencies
-
formatStringsRegistry
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
DynAttrComponentGenerationStrategy
@Autowired public DynAttrComponentGenerationStrategy(Messages messages, UiComponents uiComponents, DynAttrMetadata dynamicModelMetadata, Metadata metadata, MsgBundleTools msgBundleTools, AttributeOptionsLoader optionsLoader, AttributeValidators attributeValidators, WindowConfig windowConfig, ScreensHelper screensHelper, Actions actions, AttributeDependencies attributeDependencies, FormatStringsRegistry formatStringsRegistry, org.springframework.context.ApplicationContext applicationContext)
-
-
Method Details
-
createComponent
Description copied from interface:ComponentGenerationStrategy
Creates a component according to the givenComponentGenerationContext
.- Specified by:
createComponent
in interfaceComponentGenerationStrategy
- Parameters:
context
- the context instance- Returns:
- created component
-
createComponentInternal
protected Component createComponentInternal(ComponentGenerationContext context, MetaClass metaClass, String propertyName) -
createClassField
protected Component createClassField(ComponentGenerationContext context, AttributeDefinition attribute) -
createDatatypeField
protected Component createDatatypeField(ComponentGenerationContext context, AttributeDefinition attribute) -
createCollectionField
protected Component createCollectionField(ComponentGenerationContext context, AttributeDefinition attribute) -
createStringField
protected Component createStringField(ComponentGenerationContext context, AttributeDefinition attribute) -
createEnumerationField
protected Component createEnumerationField(ComponentGenerationContext context, AttributeDefinition attribute) -
createComboBox
protected Component createComboBox(ComponentGenerationContext context, AttributeDefinition attribute) -
createBooleanField
protected Field createBooleanField(ComponentGenerationContext context, AttributeDefinition attribute) -
createDateField
protected Component createDateField(ComponentGenerationContext context, AttributeDefinition attribute) -
createNumberField
protected Field createNumberField(ComponentGenerationContext context, AttributeDefinition attribute) -
createEntityField
protected EntityPicker createEntityField(ComponentGenerationContext context, AttributeDefinition attribute) -
setValueSource
-
setValidators
-
setCustomDatatype
-
setValueChangedListeners
-
setEditable
-
setCaption
-
setRequired
-
initValuesSelectActionByAttribute
protected void initValuesSelectActionByAttribute(ValuesSelectAction selectAction, AttributeDefinition attribute) -
getLocalizedEnumerationMap
-
setValuesPickerOptionsLoader
protected void setValuesPickerOptionsLoader(ValuesPicker valuesPicker, AttributeDefinition attribute, ContainerValueSource valueSource) -
setComboBoxOptionsLoader
protected void setComboBoxOptionsLoader(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
-