com.arsdigita.bebop
Interface PaginationModelBuilder

All Known Implementing Classes:
AbstractCollectionTable, DataTable

public interface PaginationModelBuilder

A model builder for the Paginator component.

The getTotalSize(Paginator, PageState) method of this class is called during the generation of page links for a Paginator component. When using a Paginator component with a List or a Table, you can achieve greater flexibility in terms of caching and performance by having the model builder implement this interface.

Unlike other model builder classes in Bebop, there is no PaginationModel class, as this would only be an int.

Since:
4.6.10
Version:
$Id: //core-platform/dev/src/com/arsdigita/bebop/PaginationModelBuilder.java#8 $
Author:
Phong Nguyen
See Also:
Paginator

Method Summary
 int getTotalSize(Paginator paginator, PageState state)
          Returns the total number of results to paginate.
 boolean isVisible(PageState state)
          Determines whether the paginator should be visible in the request represented by state.
 

Method Detail

getTotalSize

public int getTotalSize(Paginator paginator,
                        PageState state)
Returns the total number of results to paginate.

Parameters:
paginator - the Paginator instance that invoked this method
state - the current page state
Returns:
the total number of results to paginate.

isVisible

public boolean isVisible(PageState state)
Determines whether the paginator should be visible in the request represented by state. This should normally delegate to the isVisible method of the associated displayed component.

Parameters:
state - represents the current request
Returns:
true if the paginator is visible in the request; false otherwise.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC