Skip to content
Snippets Groups Projects
Commit c8d86f17 authored by tpylak's avatar tpylak
Browse files

minor: remove unnecessary field

SVN: 13244
parent 0e88ee8c
No related branches found
No related tags found
No related merge requests found
......@@ -198,9 +198,6 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
// result set key of the last refreshed data
private String resultSetKey;
/** the number of all objects cached in the browser */
private int totalCount;
private IDataRefreshCallback refreshCallback;
protected AbstractBrowserGrid(final IViewContext<ICommonClientServiceAsync> viewContext,
......@@ -618,7 +615,6 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
// save the key of the result, later we can refer to the result in the cache using this
// key
saveCacheKey(result.getResultSetKey());
totalCount = result.getTotalLength();
GridRowModels<T> rowModels = result.getList();
List<GridCustomColumnInfo> customColumnMetadata = rowModels.getCustomColumnsMetadata();
customColumnsMetadataProvider.setCustomColumnsMetadata(customColumnMetadata);
......@@ -1265,10 +1261,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
/** @return the number of all objects cached in the browser */
public int getTotalCount()
{
// NOTE: Maybe there is a better way to get this value without keeping it on field variable.
// Bottom toolbar displays it so there has to be access to this, but e.g.
// grid.getStore().getCount() returns only number of items displayed on the current page.
return totalCount;
return pagingToolbar.getTotalCount();
}
private void refreshColumnsSettings()
......
......@@ -77,6 +77,12 @@ public final class BrowserGridPagingToolBar extends PagingToolBarAdapter
add(exportButton);
}
/** Total number of items on all pages */
public int getTotalCount()
{
return totalLength;
}
private void add(Widget widget)
{
add(new AdapterToolItem(widget));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment