Simple QDataRepeater using AJAX-triggered Pagination
The main difference between a QDataGrid
and a QDataRepeater
is that while a
is in a table
and has a lot structure to help define how that table should be rendered, a QDataRepeater
is basically without structure. You simply specify a template file which will be used to
define how you wish each Person
object to be rendered.
This very simple QDataRepeater
has a QPaginator
defined with it, and
property set to true.
With this combination, the user will be able to page through the collection of Person
without a page refresh.
Note that because the QPaginator
is rendered by the form
(as opposed to the example
where the datagrid
rendered the paginator), we will set the form
as the paginator's parent.
Also, note that QDataRepeater allows you to set two
paginators: a Paginator
. This is to offer listing pages which have the paginator at the
top and at the bottom of the page.
The same variables of $_FORM
you would have used with a QDataGrid
are also available to you in your QDataRepeater