From f56a346b78a49ed73d64044cca182a7346bcb552 Mon Sep 17 00:00:00 2001 From: Lin Hua Cheng Date: Mon, 28 Jan 2013 23:31:31 -0800 Subject: [PATCH] Invoke the has_more_data function of tables when loading TableTab. This allows classes extending TableTab to support pagination. Fixes bug 1108195. Change-Id: I4331aa66f0686f9991eb56721564a12248411a1f --- horizon/tabs/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/horizon/tabs/base.py b/horizon/tabs/base.py index d0c8ea6f15..3ff0c1ea17 100644 --- a/horizon/tabs/base.py +++ b/horizon/tabs/base.py @@ -432,6 +432,7 @@ class TableTab(Tab): "on %s." % (func_name, cls_name)) # Load the data. table.data = data_func() + table._meta.has_more_data = self.has_more_data(table) # Mark our data as loaded so we don't run the loaders again. self._table_data_loaded = True @@ -453,3 +454,6 @@ class TableTab(Tab): context["table"] = table context["%s_table" % table_name] = table return context + + def has_more_data(self, table): + return False