Class AbstractDetailRenderer<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText & com.vaadin.flow.component.HasStyle,E,R extends AbstractDetailRenderer<C,E,R>>

java.lang.Object
com.vaadin.flow.data.renderer.Renderer<E>
com.vaadin.flow.data.renderer.LitRenderer<E>
com.vaadin.flow.data.renderer.ComponentRenderer<C,E>
io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer<C,E,R>
Type Parameters:
C - component type rendered in a grid cell
E - entity item type
R - renderer type used for fluent configuration methods
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DetailButtonRenderer, DetailLinkRenderer

public abstract class AbstractDetailRenderer<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText & com.vaadin.flow.component.HasStyle,E,R extends AbstractDetailRenderer<C,E,R>> extends com.vaadin.flow.data.renderer.ComponentRenderer<C,E>
Base class for component renderers that create controls for opening an entity detail view.
See Also:
  • Field Details

    • textValueProvider

      protected final com.vaadin.flow.function.ValueProvider<E,String> textValueProvider
    • text

      protected String text
    • classNames

      protected String classNames
    • css

      protected String css
    • viewId

      protected String viewId
    • viewClass

      protected Class<? extends View<?>> viewClass
  • Constructor Details

    • AbstractDetailRenderer

      protected AbstractDetailRenderer(com.vaadin.flow.function.ValueProvider<E,String> textValueProvider)
      Creates a renderer with a value provider used as a fallback text source.
      Parameters:
      textValueProvider - value provider for cell text when explicit text is not configured
  • Method Details

    • createComponent

      public C createComponent(E item)
      Overrides:
      createComponent in class com.vaadin.flow.data.renderer.ComponentRenderer<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasText & com.vaadin.flow.component.HasStyle,E>
    • configureComponent

      protected abstract void configureComponent(C component, E item)
    • createComponentInternal

      protected abstract C createComponentInternal()
    • getTextValue

      protected String getTextValue(E item)
    • applyClassNames

      protected void applyClassNames(C component)
    • applyCss

      protected void applyCss(C component)
    • split

      protected List<String> split(String names)
    • applyCss

      protected void applyCss(String css, BiConsumer<String,String> setter)
    • withText

      public R withText(@Nullable String text)
      Sets explicit text for the rendered component.
      Parameters:
      text - text to show, or null to use the fallback item value
      Returns:
      this renderer
    • withClassNames

      public R withClassNames(@Nullable String classNames)
      Sets class names for the rendered component.
      Parameters:
      classNames - space- or comma-separated class names, or null to clear them
      Returns:
      this renderer
    • withCss

      public R withCss(@Nullable String css)
      Sets inline CSS declarations for the rendered component.
      Parameters:
      css - CSS declarations separated by semicolons, or null to clear them
      Returns:
      this renderer
    • withViewId

      public R withViewId(@Nullable String viewId)
      Sets detail view id.
      Parameters:
      viewId - detail view id
      Returns:
      this renderer
    • withViewClass

      public R withViewClass(@Nullable Class<? extends View<?>> viewClass)
      Sets detail view class.
      Parameters:
      viewClass - detail view class
      Returns:
      this renderer
    • getThis

      protected R getThis()