Package io.jmix.dynmodelflowui.fragment
Class DynamicLocalizedValueFragment
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<JmixValuePicker<String>>
io.jmix.flowui.fragment.Fragment<JmixValuePicker<String>>
io.jmix.dynmodelflowui.fragment.DynamicLocalizedValueFragment
- 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,FacetOwner,FragmentOwner,Serializable
public class DynamicLocalizedValueFragment
extends Fragment<JmixValuePicker<String>>
implements com.vaadin.flow.component.HasSize
Reusable editor for a
DynamicLocalizedValueModel, which carries either a single literal
value or a per-locale messages list. Hosts embed it once per localized-value
field instead of repeating the valuePicker + dynmod_LocalizedMessageEdit +
value_clear wiring in every detail view.
The host owns the data containers and passes them in declaratively:
<fragment class="io.jmix.dynmodelflowui.fragment.DynamicLocalizedValueFragment">
<properties>
<property name="valueContainer" value="messageDc" type="CONTAINER_REF"/>
<property name="messagesContainer" value="messageMessagesDc" type="CONTAINER_REF"/>
<property name="label" value="msg://io.jmix.dynmodelflowui.model/DynamicUniqueConstraintModel.message"/>
</properties>
</fragment>
Each embedded instance binds to its own containers, so the same fragment can be used several
times within one host.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.fragment.Fragment
Fragment.ReadyEvent -
Field Summary
Fields inherited from class io.jmix.flowui.fragment.Fragment
fragmentActions, fragmentData, fragmentFacets, parentController, uiComponents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the picker label.voidSets the host-owned container of the edited value's localized messages.voidSets the host-owned container of the edited localized value.Methods inherited from class io.jmix.flowui.fragment.Fragment
addReadyListener, findInnerComponent, getFragmentActions, getFragmentData, getFragmentFacets, getInnerComponent, getParentController, initContent, onAttach, onDetach, setFragmentActions, setFragmentData, setFragmentFacets, setParentController, setUiComponentsMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, 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 io.jmix.flowui.facet.FacetOwner
getIdMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, 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, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
DynamicLocalizedValueFragment
public DynamicLocalizedValueFragment()
-
-
Method Details
-
setValueContainer
Sets the host-owned container of the edited localized value. Required; injected via aCONTAINER_REFfragment property. -
setMessagesContainer
public void setMessagesContainer(CollectionPropertyContainer<DynamicLocalizedMessageModel> container) Sets the host-owned container of the edited value's localized messages. Required; injected via aCONTAINER_REFfragment property. -
setLabel
Sets the picker label. Accepts a plain string or amsg://reference, which is resolved against the message bundles.
-