Facets

Facets are screen elements that are not added to the screen layout, unlike visual components. Instead, they add supplementary behavior to the screen or one of its components.

facets

The framework provides the following facets:

Even though the Action is located in the Facets section of Component Palette, it is a significant topic described on a separate page.

The application or an add-on can provide its own facets. To create a custom facet, follow the steps below:

  1. Create an interface extending io.jmix.ui.component.Facet.

  2. Create implementation class based on io.jmix.ui.component.impl.AbstractFacet.

  3. Create a Spring bean implementing the io.jmix.ui.xml.FacetProvider interface parameterized by the type of your facet.

  4. Create an XSD to be used in screens XML.

  5. Optionally, mark the facet interface and its methods with metadata annotations to add support for the facet in the Component Inspector panel of the Studio’s Screen Designer.

Classes ClipboardTrigger, ClipboardTriggerImpl and ClipboardTriggerFacetProvider of the framework can be an excellent example of creating a facet.