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:
  • Constructor Details

    • DynamicLocalizedValueFragment

      public DynamicLocalizedValueFragment()
  • Method Details

    • setValueContainer

      public void setValueContainer(InstancePropertyContainer<DynamicLocalizedValueModel> container)
      Sets the host-owned container of the edited localized value. Required; injected via a CONTAINER_REF fragment property.
    • setMessagesContainer

      public void setMessagesContainer(CollectionPropertyContainer<DynamicLocalizedMessageModel> container)
      Sets the host-owned container of the edited value's localized messages. Required; injected via a CONTAINER_REF fragment property.
    • setLabel

      public void setLabel(@Nullable String label)
      Sets the picker label. Accepts a plain string or a msg:// reference, which is resolved against the message bundles.