Class DynamicAttributesPanel

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.dynattrflowui.panel.DynamicAttributesPanel
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, Serializable

public class DynamicAttributesPanel extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout> implements com.vaadin.flow.component.HasSize
See Also:
  • Field Details

    • NAME

      public static final String NAME
      See Also:
    • DEFAULT_FIELD_WIDTH

      public static final String DEFAULT_FIELD_WIDTH
    • uiComponentsGenerator

      protected final UiComponentsGenerator uiComponentsGenerator
    • uiComponents

      protected final UiComponents uiComponents
    • messages

      protected final Messages messages
    • dynAttrMetadata

      protected final DynAttrMetadata dynAttrMetadata
    • viewValidation

      protected final ViewValidation viewValidation
    • instanceContainer

      protected InstanceContainer<?> instanceContainer
    • fieldWidth

      protected String fieldWidth
    • rootPanel

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout rootPanel
    • categoryFieldBox

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout categoryFieldBox
    • categoryFieldLabel

      protected com.vaadin.flow.component.html.H3 categoryFieldLabel
    • categoryField

      protected JmixComboBox<Category> categoryField
    • propertiesForm

      protected JmixFormLayout propertiesForm
  • Constructor Details

  • Method Details

    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component
    • onValidation

      protected void onValidation(StandardDetailView.ValidationEvent validationEvent)
    • initContent

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()
      Overrides:
      initContent in class com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
    • initPropertiesForm

      protected void initPropertiesForm()
    • addFieldsToForm

      protected void addFieldsToForm(com.vaadin.flow.component.formlayout.FormLayout newPropertiesForm, Map<AttributeDefinition,com.vaadin.flow.component.Component> fields)
    • getAttributesByCategory

      protected Collection<AttributeDefinition> getAttributesByCategory()
    • generateFieldComponent

      protected com.vaadin.flow.component.Component generateFieldComponent(AttributeDefinition attribute)
    • setWidth

      protected void setWidth(com.vaadin.flow.component.Component component, AttributeDefinition attribute)
    • initCategoryField

      protected void initCategoryField(InstanceContainer<?> instanceContainer)
    • getDefaultCategory

      @Nullable protected Category getDefaultCategory()
    • getCategoryDefinitions

      protected Collection<CategoryDefinition> getCategoryDefinitions()
    • getCategoriesOptionsList

      protected List<Category> getCategoriesOptionsList()
    • onInstanceContainerItemChangeEvent

      protected void onInstanceContainerItemChangeEvent(InstanceContainer.ItemChangeEvent<?> event)
    • setCategoryFieldVisible

      public void setCategoryFieldVisible(boolean visible)
      Sets the visibility of the category field.
      Parameters:
      visible - true to make the category field visible, false otherwise
    • setInstanceContainer

      public void setInstanceContainer(InstanceContainer<Object> container)
      Defines InstanceContainer for DynamicAttributesPanel.
      Parameters:
      container - InstanceContainer object with editing entity
    • setFieldWidth

      public void setFieldWidth(String fieldWidth)
      Sets the width of the fields. This parameter is used if some dynamic attribute does not have own width value.
      Parameters:
      fieldWidth - width of the fields