@Dependent @Alternative public class EntitiesPagedList<T> extends EntitiesList<T>
Presenter class for listing entities, with automatic pagination feature management.
Notes:
By default the onChangePage
callback method is not fired, it's handled by this class itself.
EntitiesList.Callback<T>, EntitiesList.PaginationConstraints, EntitiesList.View
Modifier and Type | Field and Description |
---|---|
protected EntitiesList.Callback<T> |
callback |
protected int |
currentPage |
protected Collection<T> |
entities |
DEFAULT_PAGE_SIZE, view
Constructor and Description |
---|
EntitiesPagedList(LoadingBox loadingBox,
EntitiesList.View view) |
Modifier and Type | Method and Description |
---|---|
protected List<T> |
buildPageEntities(int start,
int end) |
protected EntitiesList.PaginationConstraints |
buildPaginationConstraints(int size) |
void |
clear() |
protected Collection<T> |
getEntities() |
protected boolean |
hasMorePages() |
protected void |
show() |
void |
show(Collection<T> entities,
EntitiesList.Callback<T> callback) |
asWidget, createPaginationCallback, hideLoadingView, init, select, setEmptyEntitiesText, setEntityTitleSize, setPageSize, show, show, showLoadingView, unselect
protected Collection<T> entities
protected EntitiesList.Callback<T> callback
protected int currentPage
@Inject public EntitiesPagedList(LoadingBox loadingBox, EntitiesList.View view)
public void show(Collection<T> entities, EntitiesList.Callback<T> callback)
protected void show()
public void clear()
clear
in class EntitiesList<T>
protected Collection<T> getEntities()
protected EntitiesList.PaginationConstraints buildPaginationConstraints(int size)
protected boolean hasMorePages()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.