ListView ======== .. granite:servercomponent:: /libs/granite/ui/components/foundation/layouts/listview :layout: :deprecated: The layout to render the items as a list. It implements :doc:`/jcr_root/libs/granite/ui/components/foundation/clientlibs/foundation/vocabulary/selections` vocabulary. It has the following content structure at the layout resource: .. gnd:gnd:: [granite:LayoutsListView] /** * The URI Template that is returning the HTML response for pagination. * It supports the following variables: * * offset * The item offset of the current request. * limit * The item limit of the pagination. * id * The id of the collection (``[data-foundation-collection-id]``). * * e.g. ``/a/b/c{.offset,limit}.html{+id}`` */ - src (StringEL) /** * The path of the current collection. It will act as the value of ``[data-foundation-collection-id]``. * * e.g. ``${requestPathInfo.suffix}`` */ - path (StringEL) /** * The resource type for each item. */ - itemResourceType (String) /** * ``true`` to expand the layout to its parent container; ``false`` otherwise. */ - maximized (Boolean) /** * The item limit of the pagination. */ - limit (Long) /** * The id of the client-side state for this layout. * * The following state is saved: * * The active layout * See ``layoutId`` property. */ - stateId (String) /** * The name associated with this layout. * * The client-side state with key ``.layoutId`` will have the value of this name. * * This is useful when :doc:`../multilayouts/index` is used, so that when the user refreshes the browser, the active layout can be restored by the MultiLayouts. * * It will only be effective when ``stateId`` property is set. */ - layoutId (String) /** * The ``itemprop`` attribute of each item. */ - itemprop (String) /** * The headers of the list. */ + headers (granite:LayoutsListViewHeaders) [granite:LayoutsListViewHeaders] /** * The ``class`` attribute. */ - class /** * Indicates if the checkbox to select/deselect all the list items is shown. */ - selectable (Boolean) The items of the layout are specified using :ref:`ItemDataSource `. Example:: + mylist - sling:resourceType = "granite/ui/components/foundation/container" + layout - sling:resourceType = "granite/ui/components/foundation/layouts/listview" - stateId = "cq.sites.childpages" - layoutId = "list" - src = "/a/b/c{.offset,limit}.html" + headers - selectable = true + col1 + col2 + col3 + datasource - sling:resourceType = "my/datasource"