Class ViewComponentTagCapabilities

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

@Component("dynmod_ViewComponentTagCapabilities") public class ViewComponentTagCapabilities extends Object
Answers which behavior handler triggers a view XML tag can serve, so the Admin UI handler editor can offer only the components a trigger can actually attach to.

The answer is derived from the same interfaces DynamicViewBehaviorManager tests at runtime: ClickNotifier for click, and SupportsTypedValue or HasValue for valueChange. The component class behind a tag is resolved through LoaderResolver, which honors application-registered custom tags and overrides of built-in ones, and then read from the loader's ComponentLoader type argument — no component is instantiated.

A tag whose component class cannot be pinned down serves neither trigger: when the tag has no loader of its own, or the loader's type argument is missing or as unspecific as the base component type, nothing supports offering it, and such an element is unlikely to be a usable target. It is left out of the dropdown; the editor's combo still accepts a typed value, so it stays reachable by hand.

  • Field Details

  • Constructor Details

    • ViewComponentTagCapabilities

      public ViewComponentTagCapabilities()
  • Method Details

    • get

      Returns what the given view XML tag can be used for. Never throws.
      Parameters:
      tag - view XML element name, such as button or textField
    • resolve

    • resolveComponentClass

      protected @Nullable Class<?> resolveComponentClass(String tag)
      Resolves the component class declared by the loader registered for the tag, or null when the tag has no loader or the loader does not name a component type.