Class DetailButtonRenderer<E>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<E>
com.vaadin.flow.data.renderer.LitRenderer<E>
com.vaadin.flow.data.renderer.ComponentRenderer<JmixButton,E>
io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer<JmixButton,E,DetailButtonRenderer<E>>
io.jmix.flowui.component.grid.renderer.DetailButtonRenderer<E>
- Type Parameters:
E- entity item type
- All Implemented Interfaces:
Serializable
public class DetailButtonRenderer<E>
extends AbstractDetailRenderer<JmixButton,E,DetailButtonRenderer<E>>
A renderer that creates a server-side
JmixButton opening an entity detail view.
The detail view can be opened either by navigation or in a dialog depending on the configured OpenMode.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DialogWindowsprotected com.vaadin.flow.function.SerializableFunction<E, com.vaadin.flow.component.Component> protected OpenModeprotected ListDataComponent<E> protected Stringprotected UiComponentsprotected ViewNavigatorsFields inherited from class io.jmix.flowui.component.grid.renderer.AbstractDetailRenderer
classNames, css, text, textValueProvider, viewClass, viewId -
Constructor Summary
ConstructorsConstructorDescriptionDetailButtonRenderer(UiComponents uiComponents, ViewNavigators viewNavigators, DialogWindows dialogWindows, ListDataComponent<E> ownerComponent, com.vaadin.flow.function.ValueProvider<E, String> textValueProvider) Creates a detail button renderer.DetailButtonRenderer(UiComponents uiComponents, ViewNavigators viewNavigators, DialogWindows dialogWindows, ListDataComponent<E> ownerComponent, com.vaadin.flow.function.ValueProvider<E, String> textValueProvider, com.vaadin.flow.function.SerializableFunction<E, com.vaadin.flow.component.Component> iconProvider) Creates a detail button renderer. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureComponent(JmixButton button, E item) protected JmixButtonprotected voidprotected voidprotected voidopenDetailView(E item) protected voidopenDialog(E item) withClickHandler(Consumer<E> clickHandler) Sets a custom click handler.withIconProvider(@Nullable com.vaadin.flow.function.SerializableFunction<E, com.vaadin.flow.component.Component> iconProvider) Sets a provider used to create button icons.withOpenMode(OpenMode openMode) Sets how the detail view is opened.withThemeNames(@Nullable String themeNames) Sets theme names for the rendered button.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
-
dialogWindows
-
ownerComponent
-
iconProvider
protected com.vaadin.flow.function.SerializableFunction<E,com.vaadin.flow.component.Component> iconProvider -
clickHandler
-
themeNames
-
openMode
-
-
Constructor Details
-
Method Details
-
initRenderer
protected void initRenderer() -
createComponentInternal
- Specified by:
createComponentInternalin classAbstractDetailRenderer<JmixButton,E, DetailButtonRenderer<E>>
-
configureComponent
- Specified by:
configureComponentin classAbstractDetailRenderer<JmixButton,E, DetailButtonRenderer<E>>
-
openDetailView
-
openDialog
-
withOpenMode
Sets how the detail view is opened.- Parameters:
openMode- open mode- Returns:
- this renderer
-
withIconProvider
public DetailButtonRenderer<E> withIconProvider(@Nullable com.vaadin.flow.function.SerializableFunction<E, com.vaadin.flow.component.Component> iconProvider) Sets a provider used to create button icons.- Parameters:
iconProvider- icon provider, ornullto render buttons without icons- Returns:
- this renderer
-
withThemeNames
Sets theme names for the rendered button.- Parameters:
themeNames- space- or comma-separated theme names, ornullto clear them- Returns:
- this renderer
-
withClickHandler
Sets a custom click handler.- Parameters:
clickHandler- click handler invoked with the current grid item- Returns:
- this renderer
-