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 cellE- entity item typeR- 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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDetailRenderer(com.vaadin.flow.function.ValueProvider<E, String> textValueProvider) Creates a renderer with a value provider used as a fallback text source. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyClassNames(C component) protected voidprotected voidapplyCss(String css, BiConsumer<String, String> setter) protected abstract voidconfigureComponent(C component, E item) createComponent(E item) protected abstract Cprotected StringgetTextValue(E item) protected RgetThis()withClassNames(@Nullable String classNames) Sets class names for the rendered component.Sets inline CSS declarations for the rendered component.Sets explicit text for the rendered component.withViewClass(@Nullable Class<? extends View<?>> viewClass) Sets detail view class.withViewId(@Nullable String viewId) Sets detail view id.Methods inherited from class com.vaadin.flow.data.renderer.ComponentRenderer
getTemplateExpression, render, updateComponentMethods inherited from class com.vaadin.flow.data.renderer.LitRenderer
getValueProviders, of, withFunction, withFunction, withPropertyMethods inherited from class com.vaadin.flow.data.renderer.Renderer
render
-
Field Details
-
textValueProvider
-
text
-
classNames
-
css
-
viewId
-
viewClass
-
-
Constructor Details
-
Method Details
-
createComponent
-
configureComponent
-
createComponentInternal
-
getTextValue
-
applyClassNames
-
applyCss
-
split
-
applyCss
-
withText
Sets explicit text for the rendered component.- Parameters:
text- text to show, ornullto use the fallback item value- Returns:
- this renderer
-
withClassNames
Sets class names for the rendered component.- Parameters:
classNames- space- or comma-separated class names, ornullto clear them- Returns:
- this renderer
-
withCss
Sets inline CSS declarations for the rendered component.- Parameters:
css- CSS declarations separated by semicolons, ornullto clear them- Returns:
- this renderer
-
withViewId
Sets detail view id.- Parameters:
viewId- detail view id- Returns:
- this renderer
-
withViewClass
Sets detail view class.- Parameters:
viewClass- detail view class- Returns:
- this renderer
-
getThis
-