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

bugfix: do no fetch all the grid rows twice

SVN: 20672
parent cef7fc98
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TypedTableModel;
public abstract class AbstractTableModelProvider<T extends ISerializable> implements
ITableModelProvider<T>
{
private TypedTableModel<T> tableModel = null;
/**
* Creates the table model with the specified maximum number of rows. If
......@@ -40,7 +41,10 @@ public abstract class AbstractTableModelProvider<T extends ISerializable> implem
*/
public TypedTableModel<T> getTableModel(int maxSize)
{
TypedTableModel<T> tableModel = createTableModel();
if (tableModel == null)
{
tableModel = createTableModel();
}
List<TableModelColumnHeader> headers = tableModel.getHeader();
List<TableModelRowWithObject<T>> rows = tableModel.getRows();
List<TableModelRowWithObject<T>> limitedRows = new ArrayList<TableModelRowWithObject<T>>();
......
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