Class FragmentComposite

java.lang.Object
com.vaadin.flow.component.Component
de.codecamp.vaadin.flowdui.custom.Composite
de.codecamp.vaadin.flowdui.FragmentComposite
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, Serializable

public abstract class FragmentComposite extends Composite
Abstract base class for composites whose content is created from a template fragment.

Use TemplateId to explicitly specify a template ID. This annotation is also found in superclasses or enclosing classes.
Use FragmentId to explicitly specify a fragment ID. This annotation is also found in superclasses.

Override Composite.contentCreated() to execute code right after the content has been initialized.

See Composite for important information about the initialization.

Using this class is completely optional and only provides a bit of convenience.

See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new composite based on a template fragment.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final com.vaadin.flow.component.Component
    Creates and returns the content.

    Methods inherited from class de.codecamp.vaadin.flowdui.custom.Composite

    contentCreated, getChildren, getContent, getElement, initContent, initialize

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, fireEvent, from, get, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener
  • Constructor Details

    • FragmentComposite

      protected FragmentComposite()
      Creates a new composite based on a template fragment. Content is initialized lazily or when Composite.initialize() is called.
  • Method Details

    • createContent

      protected final com.vaadin.flow.component.Component createContent()
      Description copied from class: Composite
      Creates and returns the content.
      Specified by:
      createContent in class Composite
      Returns:
      the newly created content; most not be null