netui-data:pager Tag

<netui-data:pager> Tag

This tag sets the number of records rendered on an individual page of <netui-data:grid> data and renders the navigation links for moving between pages.

Syntax

<netui-data:pager
    action="string_action"
    [pageSize="integer_pageSize"]
    [renderInFooter="boolean_renderInFooter"]
    [renderInHeader="boolean_renderInHeader"] />

Description

This tag sets the number of records rendered on an individual page of <netui-data:grid> data and renders the navigation links for moving between pages. The navigation links can be rendered before the <netui-data:grid> table, after the table, or both by setting the renderInHeader, renderInFooter, or both of these attributes, respectively.

The navigation links have the following default format:

    Page # of # [Prev] [Next]

The "Page # of #" phrase is computed using the current page, the page size, and the data set size. If there is no data, the pager will read "Page 1 of 1". The "Prev" and "Next" links are optional depending on the size of the data set, the current page, and the page size. The rules are:

Attributes

actionThe action method that will be invoked if by the navigation links. This attribute is required. If the Page Flow has been automatically generated from a RowSet control, the action method pageAction is provided by default:
     /**
      * @jpf:action
      * @jpf:forward name="page" path="grid.jsp"
      */
      public Forward pageAction()
          throws Exception
      {
          sortFilterService = SortFilterService.getInstance(getRequest());
          return new Forward("page");
      }
 
RequiredSupports runtime expression evaluationData bindable
YesNoNo

pageSizeInteger. The number of data rows that will be displayed in a <netui-data:grid> The default value is 10 rows.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

renderInFooterBoolean. If set to true, the navigational links render at the bottom of the table. The default value of this attribute is true.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

renderInHeaderBoolean. If set to true, the navigational links render at the top of the table. The default value of this attribute is false.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

Sample

This sample shows a <netui-data:grid> tag that will render 5 items per page. Links to other pages will appear in the header and footer.
    <netui-data:grid dataSource="{pageFlow.allRows}" name="{pageFlow.gridName}">
        <netui-data:gridStyle styleClassPrefix="gridStyle"/>
        <netui-data:pager pageSize="5" renderInHeader="true" action="pageAction" renderInFooter="true"/>
        <netui-data:columns filterAction="begin" sortAction="begin">
            <netui-data:basicColumn filterable="true" title="Itemname" sortable="true" name="itemname"/>
            <netui-data:basicColumn filterable="true" title="Price" sortable="true" name="price"/>
        </netui-data:columns>
    </netui-data:grid>
 

Sample Code

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/grid/grid.jsp

Related Topics

<netui-data:grid> Tag