Fields and methods of the jala.ListRenderer class.
parameters
| HopObject, ArrayList, Array | coll | The collection this ListRenderer operates on, or - for backwards compatibility only - a parameter object containing the collection and any other optional configuration parameters. |
| Object | renderer | An optional renderer to use. If this is set, any rendering method defined in this renderer overrides the default renderer. |
methods
- setCollection(coll)
- setPageSize(size)
- setMaxPages(pages)
- setBaseHref(href)
- setItemSkin(name)
- setUrlParameterName(name)
- setUrlParameters(params)
- setRenderer(r)
- getPageHref(page)
- renderList(param)
- getList(param)
- renderListAsString(param)
- renderPrevLink(param)
- getPrevLink(param)
- renderPrevLinkAsString(param)
- renderNextLink(param)
- getNextLink(param)
- renderNextLinkAsString(param)
- renderPageNavigation(param)
- getPageNavigation(param)
- renderPageNavigationAsString(param)
- limit_macro(param)
- prevLink_macro(param)
- nextLink_macro(param)
- pageNavigation_macro(param)
- render_macro(param)
Creates a new ArrayList instance.
parameters
| Array | arr | The array (or a subsection of an array) to wrap |
| Number | offset | An optional offset to use (mandatory if the array is just a subsection). |
| Number | total | An optional total size of the array. This argument is mandatory if the wrapped array is just a subsection. |
methods
- get(idx)
- size()
- isSubset()
properties
- Number offset
- Number length
Default Renderer object containing functions
used for rendering different list items (eg. page navigation,
prev/next links and list items).
List renderer object
Pagenavigation renderer object
Pagelink renderer object
The offset of this ArrayList instance. This might be > zero for
ArrayList instances wrapping just a subsection, that is
mimicking a bigger list.
The length of this ArrayList instance.
Methods
Returns the collection this ListRenderer instance operates on
returns
| The collection of this ListRenderer |
Sets the collection of this ListRenderer
parameters
| HopObject, ArrayList, Array | coll | The collection this ListRenderer instance should operate on |
Returns the number of items displayed on one page
returns
| The number of items displayed on a single page |
Sets the number of items to display on a single page
parameters
| Number | size | The number of items to display on one page |
Returns the current page index. This is either the page url parameter
or the page number 1.
returns
| The current page number (starts with 1). |
see
Returns the maximum number of pages handled by this ListRenderer instance
returns
| The maximum number of pages |
Sets the maximum number of pages to display
parameters
| Number | pages | The maximum number of pages to display |
Returns the total number of pages handled by this ListRenderer instance
(which is the collection size divided by the page size).
returns
| The total number of pages |
Returns the base href of this ListRenderer instance
returns
| The base href of this ListRenderer instance |
Sets the base href of this ListRenderer instance. All links rendered
will start with the href passed as argument
parameters
| String | href | The base href to use for rendering links |
Returns the name of the skin rendered for a single list item
returns
| The name of the list item skin |
Sets the name of the skin to render for every list item
parameters
| String | name | The name of the skin to render for every list item |
Returns the name of the URL parameter name containing the index
of the page to display
returns
| The name of the page URL parameter name |
Sets the name of the URL parameter name containing the index of the page
to display
parameters
| String | name | The name of the page URL parameter |
Returns any additional URL parameters included in every navigation link
rendered by this ListRenderer instance.
returns
| A string containing additional URL parameters |
Sets additional parameters to include in every navigation link
parameters
| String | params | A string to append to every navigation URL |
Returns the renderer used by this ListRenderer instance
Sets the renderer to be used by this ListRenderer instance
parameters
| Object | r | The renderer to use |
Returns the href of a page. If no argument is given, the href
of the current page is returned. Any URL parameters set with
{@link #setUrlParameters} are added to the href.
parameters
| Number | page | The optional page number to include in the href. |
returns
| The href of the page |
see
Returns the zero-based index position of the first item of the current page
in the collection this ListRenderer operates on.
returns
| The index position of the first item in the list |
Returns the zero-based index position of the last item of the current page
in the collection this ListRenderer operates on.
returns
| The index position of the last item in the list |
Renders the list of items for one page directly to response.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
see
Returns the rendered list of collection items as string
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| The rendered list |
see
Returns the rendered list of collection items as string
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| The rendered list |
see
Renders a link to the previous page directly to response.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
see
Returns a rendered link to the previous page as string. For performance
reasons this method caches the rendered link in the local cache of this
ListRenderer instance.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| A rendered link to the previous page |
see
Returns a rendered link to the previous page as string
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| A rendered link to the previous page |
Renders a link to the next page directly to response.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
see
Returns a rendered link to the previous page as string. For performance
reasons this method caches the rendered link in the local cache of this
ListRenderer instance.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| A rendered link to the previous page |
see
Returns a rendered link to the previous page as string
parameters
| param |
returns
| A rendered link to the next page |
Renders the page navigation bar directly to response. For performance reasons
this method caches the rendered page navigation in the local cache of this
ListRenderer instance.
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
see
Returns the rendered page navigation bar as string
parameters
| Object | param | Object containing extra parameters (e.g. from a macro call). |
returns
| The rendered page navigation |
see
Returns the rendered page navigation bar as string
parameters
| param |
returns
| The rendered page navigation bar |
Either renders the maximum number of items per page, or
sets the limit to a given number.
parameters
| Object | param |
Extra macro parameters:
|
returns
| The current maximum number of items per page |
Returns a rendered link to the previous page.
parameters
| Object | param |
Extra macro parameters:
|
returns
| A rendered link to the previous page |
see
Returns a rendered link to the next page.
parameters
| Object | param |
Extra macro parameters:
|
returns
| A rendered link to the next page |
see
Returns the rendered page navigation bar.
parameters
| Object | param |
Extra macro parameters:
|
returns
| The rendered page navigation bar |
see
Returns the total number of items
returns
| The total number of items in the collection this ListRenderer instance is working on |
Returns the total number of pages
returns
| The total number of pages available |
Returns the current page number
returns
| The current page number |
Returns the start item number in the current page
returns
| The start item number in the current page |
Returns the end item number in the current page
returns
| The end item number in the current page |
Renders the current page of this list.
parameters
| Object | param |
Extra macro parameters:
|
see
Returns the element at the index position passed
as argument. If the wrapped array is just a subsection
the index position passed will be corrected using
the offset.
parameters
| Number | idx | The index position of the element to return |
returns
| The element at the given index position |
Returns the size of this ArrayList, which is either
the length of the wrapped array or the total size
passed as argument to the constructor (in case the wrapped
array is just a subsection).
returns
| The size of this ArrayList instance |
Returns true if this ArrayList is a subsection of a bigger array
returns
| True if this ArrayList is a subsection of a bigger array |
Returns the actual size of this ArrayList's wrapped array.
returns
| The actual size of this ArrayList's wrapped array. |
