T - ID - @CssImport(value="entity-grid.css") @CssImport(value="entity-grid-vaadin-grid.css",themeFor="vaadin-grid") @CssImport(value="entity-grid-vcf-toggle-button.css",themeFor="vcf-toggle-button")
public abstract class EntityGrid<T,ID extends Serializable>
extends com.vaadin.flow.component.orderedlayout.VerticalLayout
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityGrid.FilterMode |
| Modifier and Type | Field and Description |
|---|---|
protected com.vaadin.flow.component.button.Button |
addButton |
protected com.vaadin.componentfactory.ToggleButton |
advancedButton |
protected Collection<com.vaadin.flow.component.grid.Grid.Column<T>> |
advancedColumns |
protected org.springframework.context.ApplicationContext |
appCtx |
protected com.vaadin.flow.component.grid.Grid.Column<?> |
buttonColumn |
protected Boolean |
caseSensitive |
protected Boolean |
columnsResizable |
protected com.vaadin.flow.component.html.Span |
count |
protected com.vaadin.flow.component.html.Span |
countAndAdvanced |
protected String |
createText |
protected com.vaadin.flow.data.provider.DataProvider<T,?> |
dataProvider |
protected Boolean |
defaultSortAsc |
protected String |
defaultSortOrderProperty |
protected com.vaadin.flow.component.button.Button |
deleteButton |
protected com.vaadin.flow.component.button.Button |
editButton |
protected Boolean |
emptyFilter |
protected Class<T> |
entityClass |
protected String |
entityName |
protected String |
entityNamePlural |
protected Class<? extends com.vaadin.flow.component.Component> |
entityView |
protected com.vaadin.flow.component.textfield.TextField |
filter |
protected T |
filterEntity |
protected EntityGrid.FilterMode |
filterMode |
protected com.vaadin.flow.component.grid.Grid<T> |
grid |
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout |
header |
static org.slf4j.Logger |
LOGGER |
protected EntityGridRefreshThread |
refreshThread |
protected org.springframework.data.repository.PagingAndSortingRepository<T,ID> |
repository |
protected Boolean |
showButtonColumn |
protected Boolean |
showCount |
protected Boolean |
showCreateButton |
protected Boolean |
showDeleteButton |
protected Boolean |
showEditButton |
protected Boolean |
showFilter |
protected Boolean |
showHeader |
| Constructor and Description |
|---|
EntityGrid(Class<T> c,
Class<? extends com.vaadin.flow.component.Component> ev,
EntityGrid.FilterMode fm,
String sortProp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addButtonColumn(com.vaadin.flow.component.orderedlayout.HorizontalLayout buttons,
T e) |
void |
changeFilter(String text) |
void |
clearFilter() |
void |
clickDelete(T e) |
void |
clickEdit(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> click,
T entity) |
void |
clickNew(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> click) |
com.vaadin.flow.data.provider.DataProvider<T,?> |
createDataProvider() |
com.vaadin.flow.component.dialog.Dialog |
createDialog(T entity) |
T |
createFilterEntity() |
void |
delete(T e) |
void |
delete(T e,
ConfirmDialog d,
ConfirmDialog.ButtonConfig bc) |
Long |
getCountAll() |
List<com.vaadin.flow.data.provider.QuerySortOrder> |
getDefaultSortOrder() |
ID |
getEntityId(T entity) |
String |
getEntityName() |
String |
getEntityName(T t) |
String |
getEntityNamePlural() |
com.vaadin.flow.component.grid.Grid<T> |
getGrid() |
com.vaadin.flow.component.orderedlayout.HorizontalLayout |
getHeader() |
abstract org.springframework.data.repository.PagingAndSortingRepository<T,ID> |
getRepository() |
void |
postConstruct() |
void |
refresh() |
void |
refresh(T entity) |
void |
refreshEvery(Long ms) |
void |
setFilter(String text) |
void |
setupAdvancedColumns(com.vaadin.flow.component.grid.Grid<T> grid,
Collection<com.vaadin.flow.component.grid.Grid.Column<T>> coll) |
abstract void |
setupColumns(com.vaadin.flow.component.grid.Grid<T> grid) |
void |
shortcutDetails(T e) |
void |
showAdvanced(boolean show) |
void |
updateCount() |
addAndExpand, getAlignItems, getAlignSelf, getDefaultHorizontalComponentAlignment, getHorizontalComponentAlignment, setAlignItems, setAlignSelf, setDefaultHorizontalComponentAlignment, setHorizontalComponentAlignment, setPadding, setSpacingaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoxSizing, getThemeList, isMargin, isPadding, isSpacing, setBoxSizing, setMarginexpand, getFlexGrow, getJustifyContentMode, replace, setFlexGrow, setJustifyContentModegetChildren, getComponentAt, getComponentCount, indexOfadd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAlladdClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamegetCssSize, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullpublic static final org.slf4j.Logger LOGGER
@Autowired protected org.springframework.context.ApplicationContext appCtx
protected org.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable> repository
protected com.vaadin.flow.data.provider.DataProvider<T,?> dataProvider
protected T filterEntity
protected Class<? extends com.vaadin.flow.component.Component> entityView
protected com.vaadin.flow.component.grid.Grid<T> grid
protected Boolean defaultSortAsc
protected String defaultSortOrderProperty
protected String entityName
protected String entityNamePlural
protected Boolean showButtonColumn
protected Boolean showEditButton
protected Boolean showDeleteButton
protected Boolean showCreateButton
protected Boolean showHeader
protected Boolean showCount
protected Boolean showFilter
protected Boolean columnsResizable
protected com.vaadin.flow.component.html.Span count
protected com.vaadin.flow.component.textfield.TextField filter
protected com.vaadin.flow.component.grid.Grid.Column<?> buttonColumn
protected String createText
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout header
protected com.vaadin.flow.component.html.Span countAndAdvanced
protected com.vaadin.flow.component.button.Button editButton
protected com.vaadin.flow.component.button.Button deleteButton
protected com.vaadin.flow.component.button.Button addButton
protected com.vaadin.componentfactory.ToggleButton advancedButton
protected Collection<com.vaadin.flow.component.grid.Grid.Column<T>> advancedColumns
protected EntityGrid.FilterMode filterMode
protected Boolean caseSensitive
protected Boolean emptyFilter
protected EntityGridRefreshThread refreshThread
public EntityGrid(Class<T> c, Class<? extends com.vaadin.flow.component.Component> ev, EntityGrid.FilterMode fm, String sortProp)
@PostConstruct public void postConstruct()
public void refresh()
public void refresh(T entity)
public void addButtonColumn(com.vaadin.flow.component.orderedlayout.HorizontalLayout buttons,
T e)
public void shortcutDetails(T e)
public void clickDelete(T e)
public void delete(T e, ConfirmDialog d, ConfirmDialog.ButtonConfig bc)
public void delete(T e)
public void clickEdit(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> click,
T entity)
public com.vaadin.flow.data.provider.DataProvider<T,?> createDataProvider()
public List<com.vaadin.flow.data.provider.QuerySortOrder> getDefaultSortOrder()
public T createFilterEntity()
public void updateCount()
public Long getCountAll()
public void changeFilter(String text)
public void clickNew(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> click)
public com.vaadin.flow.component.dialog.Dialog createDialog(T entity)
public void refreshEvery(Long ms)
public String getEntityName()
public String getEntityNamePlural()
public void showAdvanced(boolean show)
public abstract org.springframework.data.repository.PagingAndSortingRepository<T,ID> getRepository()
public abstract void setupColumns(com.vaadin.flow.component.grid.Grid<T> grid)
public void setupAdvancedColumns(com.vaadin.flow.component.grid.Grid<T> grid, Collection<com.vaadin.flow.component.grid.Grid.Column<T>> coll)
public void setFilter(String text)
public void clearFilter()
public com.vaadin.flow.component.grid.Grid<T> getGrid()
public com.vaadin.flow.component.orderedlayout.HorizontalLayout getHeader()
Copyright © 2021. All rights reserved.