Package io.jmix.dynattrflowui.panel
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 Summary
FieldsModifier and TypeFieldDescriptionprotected JmixComboBox<Category>protected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected com.vaadin.flow.component.html.H3static final Stringprotected final DynAttrMetadataprotected Stringprotected InstanceContainer<?>protected final Messagesstatic final Stringprotected JmixFormLayoutprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected final UiComponentsprotected final UiComponentsGeneratorprotected final ViewValidation -
Constructor Summary
ConstructorsConstructorDescriptionDynamicAttributesPanel(UiComponentsGenerator uiComponentsGenerator, UiComponents uiComponents, Messages messages, DynAttrMetadata dynAttrMetadata, ViewValidation validate) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFieldsToForm(com.vaadin.flow.component.formlayout.FormLayout newPropertiesForm, Map<AttributeDefinition, com.vaadin.flow.component.Component> fields) protected com.vaadin.flow.component.ComponentgenerateFieldComponent(AttributeDefinition attribute) protected Collection<AttributeDefinition>protected Collection<CategoryDefinition>protected Categoryprotected voidinitCategoryField(InstanceContainer<?> instanceContainer) protected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected voidprotected voidvoidsetFieldWidth(String fieldWidth) Sets the width of the fields.voidsetInstanceContainer(InstanceContainer<Object> container) Defines InstanceContainer for DynamicAttributesPanel.protected voidsetWidth(com.vaadin.flow.component.Component component, AttributeDefinition attribute) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
NAME
- See Also:
-
DEFAULT_FIELD_WIDTH
-
uiComponentsGenerator
-
uiComponents
-
messages
-
dynAttrMetadata
-
validate
-
instanceContainer
-
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
-
propertiesForm
-
-
Constructor Details
-
DynamicAttributesPanel
public DynamicAttributesPanel(UiComponentsGenerator uiComponentsGenerator, UiComponents uiComponents, Messages messages, DynAttrMetadata dynAttrMetadata, ViewValidation validate)
-
-
Method Details
-
initContent
protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()- Overrides:
initContentin classcom.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
-
generateFieldComponent
-
setWidth
protected void setWidth(com.vaadin.flow.component.Component component, AttributeDefinition attribute) -
initCategoryField
-
getDefaultCategory
-
getCategoryDefinitions
-
getCategoriesOptionsList
-
onInstanceContainerItemChangeEvent
-
setInstanceContainer
Defines InstanceContainer for DynamicAttributesPanel.- Parameters:
container-InstanceContainerobject with editing entity
-
setFieldWidth
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
-