Class ComponentGenerationContext

java.lang.Object
io.jmix.flowui.component.ComponentGenerationContext
Direct Known Subclasses:
InputDialogGenerationContext, JpqlFilterComponentGenerationContext, MultiValueSelectView.MultiValueSelectContext, PropertyFilterComponentGenerationContext

public class ComponentGenerationContext extends Object
Contains information for ComponentGenerationStrategy when creating components using UiComponentsGenerator.
  • Field Details

    • metaClass

      protected final MetaClass metaClass
    • property

      protected final String property
    • valueSource

      protected ValueSource valueSource
    • xmlDescriptor

      protected org.dom4j.Element xmlDescriptor
    • targetClass

      protected Class<?> targetClass
    • items

      protected com.vaadin.flow.data.provider.DataProvider items
    • enumItems

      protected Class<?> enumItems
    • collectionItems

      protected CollectionContainer<?> collectionItems
  • Constructor Details

    • ComponentGenerationContext

      public ComponentGenerationContext(MetaClass metaClass, String property)
      Creates an instance of ComponentGenerationContext.
      Parameters:
      metaClass - the entity for which the component is created
      property - the entity attribute for which the component is created
  • Method Details

    • getMetaClass

      public MetaClass getMetaClass()
      Returns:
      the entity for which the component is created
    • getProperty

      public String getProperty()
      Returns:
      the entity attribute for which the component is created
    • getValueSource

      @Nullable public ValueSource getValueSource()
      Returns:
      a value source that can be used to create the component
    • setValueSource

      public ComponentGenerationContext setValueSource(@Nullable ValueSource valueSource)
      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

      @Nullable public Class<?> getEnumItems()
    • setEnumItems

      public ComponentGenerationContext setEnumItems(@Nullable Class<?> enumItems)
    • getCollectionItems

      @Nullable public CollectionContainer<?> getCollectionItems()
    • setCollectionItems

      public ComponentGenerationContext setCollectionItems(@Nullable CollectionContainer<?> collectionItems)
    • getXmlDescriptor

      @Nullable public org.dom4j.Element getXmlDescriptor()
      Returns:
      an XML descriptor which contains additional information
    • setXmlDescriptor

      public ComponentGenerationContext setXmlDescriptor(@Nullable org.dom4j.Element xmlDescriptor)
      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

      @Nullable public Class<?> getTargetClass()
      Returns:
      a target class for which a component is created
    • setTargetClass

      public ComponentGenerationContext setTargetClass(@Nullable Class<?> targetClass)
      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