Summary
Tag name: <t:dataScroller>
UIComponent class: org.apache.myfaces.custom.datascroller.HtmlDataScroller
Tag class: org.apache.myfaces.custom.datascroller.HtmlDataScrollerTag
Component type: org.apache.myfaces.HtmlDataScroller
Component family: javax.faces.Panel
Renderer type: org.apache.myfaces.DataScroller
Renderer class: org.apache.myfaces.custom.datascroller.HtmlDataScrollerRenderer
Scroller for UIData components eg. dataTable
Must be nested inside footer facet of dataTable OR for
attribute must be given so that corresponding uiData can be found.
Unless otherwise specified, all attributes accept static values or EL expressions.
A component which works together with a UIData component to allow a
user to view a large list of data one "page" at a time, and navigate
between pages.
Usage
<t:dataScroller [ user-role-support-attributes ] [for="reference to UIData"] [pageIndexVar="A parameter name, under which the actual page index is set in request scope similar to the var parameter."] [pageCountVar="A parameter name, under which the actual page count is set in request scope similar to the var parameter."]> Nested Facets: first, previous, next, last, fastforward, fastrewind </t:dataScroller>
Instructions
DataScroller must be nested inside of an UIData component, or attribute "for" must be given so that corresponding uiData can be found.
The "row" attribute must be specified on the corresponding uiData.
The scope of pageIndexVar and pageCountVar is limited, and only direct children of DataScroller may see them.
Supported Facets
Name | Required | Description |
---|---|---|
fastForward | false | |
fastRewind | false | |
first | false | |
last | false | |
next | false | |
previous | false |
Attributes
Name | Type | Supports EL? | Description |
---|---|---|---|
actionListener | javax.faces.el.MethodBinding | Only EL | MethodBinding pointing at method acception an ActionEvent with return type void. |
binding | String | Only EL | Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind to this component instance. This value must be an EL expression. |
colspan | int | Yes | standard html colspan attribute for table cell |
dir | String | Yes | HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left). |
disableFacetLinksIfFirstPage | boolean | Yes | If the dataScroller is on the first page (index is at 1), links for first, prev and fastprev are disabled. Default is false. |
disableFacetLinksIfLastPage | boolean | Yes | If the dataScroller is on the last page (index is at pagecount), links for last, next and fastnext are disabled. Default is false. |
displayValueOnly | Boolean | Yes | If true, renders only the value of the component, but no input widget. Default is false. |
displayValueOnlyStyle | String | Yes | Style used when displayValueOnly is true. |
displayValueOnlyStyleClass | String | Yes | Style class used when displayValueOnly is true. |
displayedRowsCountVar | String | Yes | A parameter name, under which the actual displayed rows count is set in request scope similar to the var parameter. |
enabledOnUserRole | String | Yes | If user is in given role, this component will be rendered normally. If not, no hyperlink is rendered but all nested tags (=body) are rendered. |
fastStep | int | Yes | step (pages) used for fastforward and fastrewind |
fastfStyleClass | String | Yes | style-class for data-scroller fast-forward-element |
fastrStyleClass | String | Yes | style-class for data-scroller fast-rewind-element |
firstRowIndexVar | String | Yes | A parameter name, under which the actual first displayed row index is set in request scope similar to the var parameter. |
firstStyleClass | String | Yes | style-class for data-scroller first-element |
for | String | Yes | The JSF id of a UIData component that this scroller will affect. If this attribute is not present then the datascroller must be a child of a UIData component. |
forceId | boolean | No | If true, this component will force the use of the specified id when rendering. |
forceIdIndex | boolean | No | If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components that are contained within a "list." This value will be true by default and the value will be ignored if the value of forceId is false (or not specified.) |
id | String | Yes | An identifier for this particular component instance within
a component view.
The id must be unique within the scope of the tag's enclosing NamingContainer (eg h:form or f:subview). The id is not necessarily unique across all components in the current view This value must be a static value, ie not change over the lifetime of a component. It cannot be defined via an EL expression; only a string is permitted. |
immediate | boolean | Yes | True means that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase. |
lang | String | Yes | HTML: The base language of this document. |
lastRowIndexVar | String | Yes | A parameter name, under which the actual last displayed row index is set in request scope similar to the var parameter. |
lastStyleClass | String | Yes | style-class for data-scroller last-element |
layout | String | Yes | The layout this scroller should render with. Default is 'table', 'list' is implemented as well. Additionally you can use 'singleList' - then the data-scroller will render a list, but not the paginator - same with the value 'singleTable'. |
nextStyleClass | String | Yes | style-class for dataScroller next-element |
onclick | String | Yes | HTML: Script to be invoked when the element is clicked. |
ondblclick | String | Yes | HTML: Script to be invoked when the element is double-clicked. |
pageCountVar | String | Yes | A parameter name, under which the actual page count is set in request scope similar to the var parameter. |
pageIndexVar | String | Yes | A parameter name, under which the actual page index is set in request scope similar to the var parameter. |
paginator | boolean | Yes | If set true, then the paginator gets rendered |
paginatorActiveColumnClass | String | Yes | styleClass for paginator's column with pageIndex = currentPageIndex |
paginatorActiveColumnStyle | String | Yes | style for paginator's column with pageIndex = currentPageIndex |
paginatorColumnClass | String | Yes | styleClass for paginator's column |
paginatorColumnStyle | String | Yes | style for paginator's column |
paginatorMaxPages | int | Yes | The maximum amount of pages to be displayed in the paginator. |
paginatorRenderLinkForActive | boolean | Yes | 'true' - render a link for the paginator's column with pageIndex = currentPageIndex. Default-value is 'true'. |
paginatorTableClass | String | Yes | styleclass for pagingator |
paginatorTableStyle | String | Yes | style for pagingator |
previousStyleClass | String | Yes | style-class for data-scroller previous-element |
renderFacetLinksIfFirstPage | boolean | Yes | If the dataScroller is on the first page (index is at 1), links for first, prev and fastprev are rendered. Default is true. |
renderFacetLinksIfLastPage | boolean | Yes | If the dataScroller is on the last page (index is at pagecount), links for last, next and fastnext are rendered. Default is true. |
renderFacetsIfSinglePage | boolean | Yes | If set to false, the facets aren't renderd if all the lines are contained on a single page. Default is true. |
rendered | boolean | Yes | A boolean value that indicates whether this component should be rendered. Default value: true. |
rowsCountVar | String | Yes | A parameter name, under which the actual rows count is set in request scope similar to the var parameter. |
style | String | Yes | HTML: CSS styling instructions. |
styleClass | String | Yes | The CSS class for this element. Corresponds to the HTML 'class' attribute. |
title | String | Yes | HTML: An advisory title for this element. Often used by the user agent as a tooltip. |
visibleOnUserRole | String | Yes | If user is in given role, this component will be rendered normally. If not, nothing is rendered and the body of this tag will be skipped. |