Class DetailLinkRenderer<E>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<E>
com.vaadin.flow.data.renderer.LitRenderer<E>
com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.html.Anchor,E>
io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer<com.vaadin.flow.component.html.Anchor,E,DetailLinkRenderer<E>>
io.jmix.flowui.component.grid.renderer.DetailLinkRenderer<E>
- Type Parameters:
E- entity item type
- All Implemented Interfaces:
Serializable
public class DetailLinkRenderer<E>
extends AbstractDetailRenderer<com.vaadin.flow.component.html.Anchor,E,DetailLinkRenderer<E>>
A renderer that creates a server-side
Anchor opening an entity detail view route.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MetaClassprotected RouteSupportprotected com.vaadin.flow.component.html.AnchorTargetprotected UiComponentsprotected ViewRegistryFields inherited from class io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer
classNames, css, text, textValueProvider, viewClass, viewId -
Constructor Summary
ConstructorsConstructorDescriptionDetailLinkRenderer(UiComponents uiComponents, RouteSupport routeSupport, ViewRegistry viewRegistry, MetaClass metaClass, com.vaadin.flow.function.ValueProvider<E, String> textValueProvider) Creates a detail link renderer. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureComponent(com.vaadin.flow.component.html.Anchor anchor, E item) protected com.vaadin.flow.component.html.Anchorprotected StringcreateHref(Object item) protected com.vaadin.flow.router.RouteDatafindRouteData(com.vaadin.flow.router.RouteConfiguration routeConfiguration, Class<? extends View<?>> detailViewClass) protected StringgetSingleRouteParameterName(com.vaadin.flow.router.RouteData routeData, Class<? extends View<?>> detailViewClass) protected voidwithHrefProvider(com.vaadin.flow.function.SerializableFunction<E, String> hrefProvider) Sets a provider used to create link href values.withTarget(@Nullable com.vaadin.flow.component.html.AnchorTarget target) Sets anchor target.Methods inherited from class io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer
applyClassNames, applyCss, applyCss, createComponent, getTextValue, getThis, split, withClassNames, withCss, withText, withViewClass, withViewIdMethods 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
-
uiComponents
-
routeSupport
-
viewRegistry
-
hrefProvider
-
target
protected com.vaadin.flow.component.html.AnchorTarget target -
metaClass
-
-
Constructor Details
-
Method Details
-
initRenderer
protected void initRenderer() -
createComponentInternal
protected com.vaadin.flow.component.html.Anchor createComponentInternal()- Specified by:
createComponentInternalin classAbstractDetailRenderer<com.vaadin.flow.component.html.Anchor,E, DetailLinkRenderer<E>>
-
configureComponent
- Specified by:
configureComponentin classAbstractDetailRenderer<com.vaadin.flow.component.html.Anchor,E, DetailLinkRenderer<E>>
-
createHref
-
findRouteData
-
getSingleRouteParameterName
-
resolveDetailViewClass
-
withTarget
public DetailLinkRenderer<E> withTarget(@Nullable com.vaadin.flow.component.html.AnchorTarget target) Sets anchor target.- Parameters:
target- anchor target, ornullto use the default browser behavior- Returns:
- this renderer
-
withHrefProvider
public DetailLinkRenderer<E> withHrefProvider(com.vaadin.flow.function.SerializableFunction<E, String> hrefProvider) Sets a provider used to create link href values.- Parameters:
hrefProvider- href provider- Returns:
- this renderer
-