Test doc
The HTML content to be displayed when dataProvider does not have any data.
When this is set to false
no extra HTML content will be generated.
The default value is the text "No results found."
Whether to enable Pjax on this widget.
A Promise which resolves when this Component has been successfully initialized.
The HTML attributes for the container of the rendering result of each data model. This can be either an array specifying the common HTML attributes for rendering each data item, or a callback that returns an array of the HTML attributes. The anonymous function will be called once for every data model returned by dataProvider. The "tag" element specifies the tag name of the container element and defaults to "div". If "tag" is false, it means no container element will be rendered.
If this property is specified as a callback, it should have the following signature:
function (model, key, index, widget)
The name of the view for rendering each data item, or a callback (e.g. an anonymous function) for rendering each data item. If it specifies a view name, the following variables will be available in the view:
model
: mixed, the data modelkey
: mixed, the key value associated with the data itemindex
: integer, the zero-based index of the data item in the items array returned by dataProvider.widget
: ListView, this widget instanceNote that the view name is resolved into the view file by the current context of the view object.
If this property is specified as a callback, it should have the following signature:
function (model, key, index, widget)
The layout that determines how different sections of the list view should be organized. The following tokens will be replaced with the corresponding section contents:
{summary}
: the summary section. See [[renderSummary()]].{items}
: the list items. See [[renderItems()]].{sorter}
: the sorter. See [[renderSorter()]].{pager}
: the pager. See [[renderPager()]].The configuration for the pager widget. By default, LinkPager will be
used to render the pager. You can use a different widget class by configuring the "class" property.
Note that the widget must support the pagination
property which will be populated with the
[[DataProvider.pagination|pagination]] value of the dataProvider and will overwrite this value.
Whether to show an empty list view if dataProvider returns no data. The default value is false which displays an element according to the emptyText and emptyTextOptions properties.
The configuration for the sorter widget. By default, LinkSorter will be
used to render the sorter. You can use a different widget class by configuring the "class" property.
Note that the widget must support the sort
property which will be populated with the
[[DataProvider.sort|sort]] value of the dataProvider and will overwrite this value.
The HTML content to be displayed as the summary of the list view. If you do not want to show the summary, you may set it with an empty string.
The following tokens will be replaced with the corresponding values:
{begin}
: the starting row number (1-based) currently being displayed{end}
: the ending row number (1-based) currently being displayed{count}
: the number of rows currently being displayed{totalCount}
: the total number of rows available{page}
: the page number (1-based) current being displayed{pageCount}
: the number of pages availableThe HTML attributes for the summary of the list view. The "tag" element specifies the tag name of the summary element and defaults to "div".
The prefix to the automatically generated widget IDs.
A counter used to generate id for widgets.
Returns the ID of the widget.
ID of the widget.
Initializes the view.
Renders a widget.
string the rendering result.
Renders the HTML content indicating that the list view has no data.
string the rendering result
Renders a single data model.
the data model to be rendered
the key value associated with the data model
the zero-based index of the data model in the model array returned by dataProvider.
the rendering result
Renders all data models.
the rendering result
Renders the pager.
string the rendering result
Renders a section of the specified name. If the named section is not supported, false will be returned.
the section name, e.g., {summary}
, {items}
.
the rendering result of the section, or false if the named section is not supported.
Renders the sorter.
string the rendering result
Renders the summary text.
Runs the widget.
Generated using TypeDoc
The ListView widget is used to display data from data provider. Each data model is rendered using the view specified.
For more details and usage information on ListView, see the guide article on data widgets.
Mahesh S Warrier https://github.com/codespede