Class DynamicAttributeComponentXmlFactory

java.lang.Object
io.jmix.dynmodelflowui.impl.DynamicAttributeComponentXmlFactory

@Component("dynmod_DynamicAttributeComponentXmlFactory") public class DynamicAttributeComponentXmlFactory extends Object
Builds dom4j elements (columns and form components) for dynamic attributes of a static entity, driven by the Admin-UI DynamicAttributeModel rather than runtime MetaProperty. Mirrors io.jmix.flowui.view.template.impl.ComponentXmlFactory's datatype-to-component mapping. New elements are created in the parent element's namespace so the serialized extension XML stays in the view namespace without redundant xmlns declarations.
  • Constructor Details

    • DynamicAttributeComponentXmlFactory

      public DynamicAttributeComponentXmlFactory()
  • Method Details

    • addColumn

      public org.dom4j.Element addColumn(org.dom4j.Element columnsElement, DynamicAttributeModel attribute)
    • addComponent

      public org.dom4j.Element addComponent(org.dom4j.Element parentElement, DynamicAttributeModel attribute, @Nullable String referencedEntityClass)
      Adds the form component of the given attribute to parentElement.
      Parameters:
      referencedEntityClass - fully qualified class name of the referenced entity; a dropdown reference without it is built as a picker
    • componentName

      public String componentName(DynamicAttributeModel attribute)
    • datatypeComponentName

      public String datatypeComponentName(@Nullable String javaClassName, boolean lob)
    • loadClass

      protected @Nullable Class<?> loadClass(@Nullable String javaClassName)
    • addAction

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

      protected org.dom4j.Element addChild(org.dom4j.Element parent, String name)
    • addPickerActions

      protected void addPickerActions(org.dom4j.Element element, DynamicAttributeModel attribute)
    • addLookupActions

      protected void addLookupActions(org.dom4j.Element element, DynamicAttributeModel attribute)
    • lookupActionIds

      protected List<String> lookupActionIds(DynamicAttributeModel attribute)
    • actionElementId

      protected String actionElementId(String actionId)