Class ComponentXmlFactory

java.lang.Object
io.jmix.flowui.view.template.impl.ComponentXmlFactory

@Component("flowui_ComponentXmlFactory") public class ComponentXmlFactory extends Object
Factory for creating XML representations of UI components based on entity metadata properties.
See Also:
  • Constructor Details

    • ComponentXmlFactory

      public ComponentXmlFactory()
  • Method Details

    • createComponentXml

      public String createComponentXml(MetaProperty metaProperty, @Nullable String dataContainerId)
      Creates an XML representation of a UI component for the given entity property.

      The component type is determined based on the property's range and type. For entity properties, appropriate actions are added to the entity picker component.

      Parameters:
      metaProperty - the entity property for which to create a component
      dataContainerId - optional data container identifier for data binding, may be null
      Returns:
      XML string representation of the component
      Throws:
      UnsupportedOperationException - if the property is collection-valued
    • createElement

      protected org.dom4j.Element createElement(MetaProperty metaProperty)
    • getDatatypeComponentName

      protected String getDatatypeComponentName(MetaProperty metaProperty)
    • isLob

      protected boolean isLob(MetaProperty metaProperty)
    • initDataBinding

      protected void initDataBinding(org.dom4j.Element element, MetaProperty metaProperty, @Nullable String dataContainerId)
    • addEntityPickerActions

      protected void addEntityPickerActions(org.dom4j.Element element, MetaProperty metaProperty)
    • addAction

      protected void addAction(org.dom4j.Element actions, String id, String type)