class: PaginatorControlSessionBean

public class: PaginatorControlSessionBean
Author: Mario Wagner
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 16.07.2009 15:33:36; Modified: 16.07.2009 15:33:36;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {DAE450D7-4136-40e2-B27A-01AFDCC7DEA0}
This PaginatorControlSessionBean is used as counterpart for the paginatorControlTop.jspf and paginatorControlBottom.jspf and can be used to handle navigation through a list of items or objects. The only information needed to initialize this bean is the number of items the list contains. The values for the number of items per page to be displayed as dropDown can be set using the numberOfItemsPerPageValues. The number of pageButtons displayed is currently limited to seven (first - prev - page1 ... page7 - next - last) and when possible, the button representing the current page will be marked and placed in the middle. Your list bean can register to the PaginatorControlSessionBean as a ValueChangeListener to get informed, when the value representing the current page selected changes.
 

Goto: Custom Properties, Fields, Methods

See also: ListControlSessionBean

Appears in: ui

Connections
 
Custom Properties
 
PaginatorControlSessionBean Attributes
Attribute Details
public static const String
  BEAN_NAME
Initial: "PaginatorControlSessionBean"
private HtmlSelectOneMenu
  cboNumberOfItemsPerPageBottom
Initial: new HtmlSelectOneMenu()
private HtmlSelectOneMenu
  cboNumberOfItemsPerPageTop
Initial: new HtmlSelectOneMenu()
private int
  currentPage
Notes: the number of pages and current page, min 1
private Integer
  currentValue
Initial: new Integer[]{new Integer(1), new Integer(1)}
Notes: the cureent value of this paginator is the combination of numberOfPages and the currentPage to be displayed
private int
  itemCount
Notes: the number of items
private int
  numberOfItemsPerPage
Notes: selected number of items to show per page
private Integer
  numberOfItemsPerPageValues
Initial: new Integer[]{10, 25, 50, 100, 250}
Notes: the number of items per page
private int
  numberOfPages
Notes: the number of pages and current page, min 1
private String
  pageButtonText
Notes: display value for the page buttons
private int
  pageButtonValue
Notes: the page button values
private boolean
  pageButtonVisible
Notes: visibility flags for the page buttons
private ArrayList
  vclList
Initial: new ArrayList()
 
PaginatorControlSessionBean Methods
Operation Details
public
addValueChangeListener(
   ValueChangeListener vcl):void
Sequential
public
firstPage():String
Sequential
Notes: Navigation call for the firstPage button
@return null to redisplay current view
public
getCboNumberOfItemsPerPageBottom():HtmlSelectOneMenu
Sequential
public
getCboNumberOfItemsPerPageTop():HtmlSelectOneMenu
Sequential
public
getCurrentPage():int
Sequential
public
getItemCount():int
Sequential
public
getNumberOfItemsPerPage():int
Sequential
public
getNumberOfItemsPerPageOptions():SelectItem
Sequential
Notes: @return the selectItems for the number of items per page dropDown
public
getNumberOfItemsPerPageValues():Integer
Sequential
public
getNumberOfPages():int
Sequential
public
getPageButtonText():String
Sequential
public
getPageButtonVisible():boolean
Sequential
private
informValueChangeListener():void
Sequential
Notes: Any registered ValueChangeListener will be informed on changes in the value containing the Integer[numberOfItemsPerPage, currentPage]
public
lastPage():String
Sequential
Notes: Navigation call for the lastPage button
@return null to redisplay current view
public
nextPage():String
Sequential
Notes: Navigation call for the nextPage button
@return null to redisplay current view
public
pageButtonAction():String
Sequential
Notes: Navigation method to be called after the pageButtonPressed actionListener. Handles the internal model update and leads navigation back to redisplay the current view.
@return null
public
pageButtonPressed(
   ActionEvent event):void
Sequential
Notes: ActionListener method which will be invoked, when a paginators pageButton has been pressed. A integer attribute is required for the currentPage evaluation.
public
PaginatorControlSessionBean():
Sequential
public
previousPage():String
Sequential
Notes: Navigation call for the previousPage button
@return null to redisplay current view
private
processModelAndDisplayUpdate():void
Sequential
public
processNumberOfItemsPerPageChanged(
   ValueChangeEvent event):void
Sequential
Notes: ValueChangeListener method for the paginatorControl.jspf to get informed when user changes the number of items to show per page
public
removeValueChangeListener(
   ValueChangeListener vcl):void
Sequential
public
setCboNumberOfItemsPerPageBottom(
   HtmlSelectOneMenu cboNumberOfItemsPerPageBottom):void
Sequential
public
setCboNumberOfItemsPerPageTop(
   HtmlSelectOneMenu cboNumberOfItemsPerPageTop):void
Sequential
public
setCurrentPage(
   int currentPage):void
Sequential
public
setItemCount(
   int itemCount):void
Sequential
public
setNumberOfItemsPerPage(
   int numberOfItemsPerPage):void
Sequential
public
setNumberOfItemsPerPageValues(
   Integer[] numberOfItemsPerPageValues):void
Sequential
Notes: this method can be used to overwrite the initial values for the number of items to show per page options
public
setNumberOfPages(
   int numberOfPages):void
Sequential