sakai
Tag pager


Pager widget that provides UI controls for paging a table. See the Sakai style guide, under heading "List Navigator UI Components".

Example:
    
    Example #1:
    <sakai:pager totalItems="92" pageSize="20" textItem="students" renderPageSize="false" />

    Example #2 (Common usage):
    <sakai:pager
        totalItems="#{pagerBean.totalItems}"
        firstItem="#{pagerBean.firstItem}"
        pageSize="#{pagerBean.pageSize}"
        valueChangeListener="#{pagerBean.handleValueChange}"
        accesskeys="true"
        immediate="true" />

    <h:dataTable first="#{pagerBean.firstItem}" rows="#{pagerBean.pageSize}" value="#{pagerBean.data}" var="item">
        <h:column>
            <h:outputText value="#{item}" />
        </h:column>
    </h:dataTable>

    Example #3 (Advanced customization):
    <sakai:pager totalItems="101" firstItem="49" pageSize="3" pageSizes="3,5,7,11"
        renderFirst="false" renderLast="false"
        textPrev="Previous page" textNext="Next page" immediate="true"
        textStatus="There are {2} things this pager is managing.  You are looking at {0} to {1} right now."
    />
    
    


Tag Information
Tag Classorg.sakaiproject.jsf.tag.PagerTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
totalItemstruefalsejava.lang.String Total number of items in the list. This attribute is read-only; the widget will get this value, but not set it.
firstItemfalsefalsejava.lang.StringThe item number (0-based) of the first item displayed. This attribute is read-write; the widget will get this value, and set it when it is changed. Alternate to using the value attribute.
pageSizefalsefalsejava.lang.String Number of items to display in a single page of items. Default is 20. This attribute is read-write; the widget will get this value, and set it when it is changed. Alternate to using the value attribute.
accesskeysfalsefalsejava.lang.String Whether to have HTML "accesskey" attributes for the buttons. Default is false.
valuefalsefalsejava.lang.String The value (which is the paging state of this widget) is two numbers in a String, of the form "firstItem,pageSize". See attributes firstItem and pageSize.
lastItemfalsefalsejava.lang.StringOne past the last item displayed (eg, items 1-10 would have lastItem=10). This attribute is write-only; the widget calculates this attribute and sets it when it has changed.
valueChangeListenerfalsefalsejava.lang.String Register a listener that will be called when the widget value (the paging state) changes. See the value attribute.
pageSizesfalsefalsejava.lang.String String which is a list of options of number of items per page. Default is "5,10,20,50,100".
renderFirstfalsefalsejava.lang.StringWhether to display the "first item" button. Default is true.
renderPrevfalsefalsejava.lang.StringWhether to display the "previous item" button. Default is true.
renderNextfalsefalsejava.lang.StringWhether to display the "next item" button. Default is true.
renderLastfalsefalsejava.lang.StringWhether to display the "last item" button. Default is true.
renderPageSizefalsefalsejava.lang.StringWhether to display the select page size dropdown. Default is true.
textFirstfalsefalsejava.lang.StringText to display on the button which goes to the first page of items. Default is "|<".
textPrevfalsefalsejava.lang.StringText to display on the button which goes to the previous page of items. Default is "<".
textNextfalsefalsejava.lang.StringText to display on the button which goes to the next page of items. Default is ">".
textLastfalsefalsejava.lang.StringText to display on the button which goes to the last page of items. Default is ">|".
textPageSizefalsefalsejava.lang.StringText message to display for selecting page size. Default is "Show {0}".
textItemfalsefalsejava.lang.StringWord that describes the items. Default is "items". This might be (for example) "students".
textStatusfalsefalsejava.lang.StringText message to display the status of paging. Default is "Viewing {0} to {1} of {2} {3}".
bindingfalsefalsejava.lang.String Component reference expression for this component.
idfalsefalsejava.lang.String Component id of this component.
renderedfalsefalsejava.lang.String Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
immediatefalsefalsejava.lang.String Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.