JSP カスタムタグのライブラリ
db、ftsearch、または view タグの結果に対してページ付けのコントロールを提供します。ボディが 1 度評価され、ヘッダーの後に viewloop タグ (view のコンテキストで) または docloop タグ (すべてのコンテキストで) があることが想定されます。ページからページへの移動は、pagefirst、pagelast、pagenext、pageprev、および pagebar タグを使用して行います。
コンテキスト
次のタグで有効です。
次の属性は、省略可能です。
direction
ASC、DSC、Ascending、Descending
デフォルトは Ascending です。
メモ この値は、最初の page タグが実行される前に、preserve タグの name 属性で指定される必要があります。指定されないと、ページ番号が正しく保存されません。1 つの JSP に複数の page タグが存在する場合は、JSP エンジンは、各 page タグに対して preserve タグが存在するかを確認し、ない場合は例外をスローします。1 つの preserve タグを使用して複数の page タグを保存するには、複数のページに対して、この name 属性で使用する名前と同じ名前を使用します。
デフォルトの名前は「page」です。
メモ この属性はページのナビゲーションタグに優先します。
インターフェース
JSP ページの現在の状態を確認するのに、次のインターフェースを使用できます。
public interface PageInfo {
// Get the current page being processed.
public abstract int getPage();
// Returns the total number of pages for this collection
// (not expensive)
public abstract int getPageCount();
// Returns TRUE if the current page is the first page
public abstract boolean isFirstPage();
// Returns TRUE if the current page is the last page
public abstract boolean isLastPage();
// Returns TRUE if the current page is the only page
public abstract boolean isOnlyPage();
// Returns TRUE if the current page is blank
// (isFirstPage() should be TRUE)
public abstract boolean isEmptyPage();