Package io.jmix.flowui.component
Class ComponentGenerationContext
java.lang.Object
io.jmix.flowui.component.ComponentGenerationContext
- Direct Known Subclasses:
InputDialogGenerationContext,JpqlFilterComponentGenerationContext,MultiValueSelectView.MultiValueSelectContext,PropertyFilterComponentGenerationContext
Contains information for
ComponentGenerationStrategy when creating
components using UiComponentsGenerator.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionContainer<?>protected Class<?>protected com.vaadin.flow.data.provider.DataProviderprotected final MetaClassprotected final Stringprotected Class<?>protected ValueSourceprotected org.dom4j.Element -
Constructor Summary
ConstructorsConstructorDescriptionComponentGenerationContext(MetaClass metaClass, String property) Creates an instance of ComponentGenerationContext. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>com.vaadin.flow.data.provider.DataProvidergetItems()Class<?>org.dom4j.ElementsetCollectionItems(CollectionContainer<?> collectionItems) setEnumItems(Class<?> enumItems) setItems(com.vaadin.flow.data.provider.DataProvider items) setTargetClass(Class<?> targetClass) Sets a target class for which a component is created, using fluent API method.setValueSource(ValueSource valueSource) Sets a value source, using fluent API method.setXmlDescriptor(org.dom4j.Element xmlDescriptor) Sets an XML descriptor which contains additional information, using fluent API method.
-
Field Details
-
metaClass
-
property
-
valueSource
-
xmlDescriptor
protected org.dom4j.Element xmlDescriptor -
targetClass
-
items
protected com.vaadin.flow.data.provider.DataProvider items -
enumItems
-
collectionItems
-
-
Constructor Details
-
ComponentGenerationContext
Creates an instance of ComponentGenerationContext.- Parameters:
metaClass- the entity for which the component is createdproperty- the entity attribute for which the component is created
-
-
Method Details
-
getMetaClass
- Returns:
- the entity for which the component is created
-
getProperty
- Returns:
- the entity attribute for which the component is created
-
getValueSource
- Returns:
- a value source that can be used to create the component
-
setValueSource
Sets a value source, using fluent API method.- Parameters:
valueSource- a value source to set- Returns:
- this object
-
getItems
@Nullable public com.vaadin.flow.data.provider.DataProvider getItems() -
setItems
public ComponentGenerationContext setItems(@Nullable com.vaadin.flow.data.provider.DataProvider items) -
getEnumItems
-
setEnumItems
-
getCollectionItems
-
setCollectionItems
public ComponentGenerationContext setCollectionItems(@Nullable CollectionContainer<?> collectionItems) -
getXmlDescriptor
@Nullable public org.dom4j.Element getXmlDescriptor()- Returns:
- an XML descriptor which contains additional information
-
setXmlDescriptor
Sets an XML descriptor which contains additional information, using fluent API method.- Parameters:
xmlDescriptor- an XML descriptor which contains additional information- Returns:
- this object
-
getTargetClass
- Returns:
- a target class for which a component is created
-
setTargetClass
Sets a target class for which a component is created, using fluent API method. For instance, a target class can be a component or a screen.- Parameters:
targetClass- a target class for which a component is created- Returns:
- this object
-