|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag com.bea.wlw.netui.tags.databinding.grid.GridComponent com.bea.wlw.netui.tags.databinding.grid.pager.Pager
public class Pager
A navigation pager for the grid. This feature allows the grid to render a subset of
data on each page and renders the navigation links for moving between
grid pages. The pager can be rendered before the grid table, after the grid table,
or both by setting the renderInHeader
, renderInFooter
,
or both of these attributes, respectively.
The rendered pager provides a reference for the current page and navigation links in the default format of:
Page # of # [Prev] [Next]
The "Page # of #" 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:
Attribute Descriptions | |||
---|---|---|---|
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
action | No | No | No |
The action to use when paging between grid pages. This is rendered on the HTML anchor that is written for all paging links. | |||
pageSize | No | No | No |
The number of data items to render on a page of a Grid. | |||
renderInFooter | No | No | No |
A boolean that will render pager before the Grid starts the data table. | |||
renderInHeader | No | No | No |
A boolean that will render a pager after the Grid closes the data table. |
Grid
,
Serialized Form<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>
This tag sets the number of records rendered on an individual
page of
com.bea.wlw.netui.tags.databinding.grid.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:
- If the first page is being rendered, the "Prev" link is not shown.
- If the last page is being rendered, the "Next" link is not shown.
- If there is only one page of data to render, neither link is shown.
Field Summary |
---|
Fields inherited from class com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag |
---|
EMPTY_STRING |
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag |
---|
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants |
---|
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
Pager()
|
Method Summary | |
---|---|
String |
getAction()
Get the action that will be invoked if the containing Grid tag is paged. |
int |
getPageSize()
Get the number of data rows that will be displayed in a Grid page. |
boolean |
getRenderInFooter()
Get a boolean that describes whether the pager will render at the end of the Grid's table. |
boolean |
getRenderInHeader()
Get a boolean that describes whether the pager will render before the Grid's table. |
String |
getTagName()
Get the name of this tag. |
protected void |
localRelease()
Reset all of the fields of this tag. |
protected int |
renderEndTag(int state)
Render a pager for the containing Grid. |
protected int |
renderStartTag(int state)
Render the start of the Pager. |
void |
setAction(String action)
Set the action that will be invoked if the containing Grid tag is paged. |
void |
setPageSize(int pageSize)
Set the number of data rows that will be displayed in a Grid. |
void |
setRenderInFooter(boolean renderInFooter)
Set a boolean that enables the Pager to render after the Grid has closed the Grid's table. |
void |
setRenderInHeader(boolean renderInHeader)
Set a boolean that enables the Pager to render before the Grid has opened the Grid's table. |
Methods inherited from class com.bea.wlw.netui.tags.databinding.grid.GridComponent |
---|
getCurrentRenderState, getGrid, getGridContext, getValidContainerType, prepare |
Methods inherited from class com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag |
---|
addContent, doEndTag, doStartTag, getContent, verifyAttributes, verifyStructure |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setParent |
Constructor Detail |
---|
public Pager()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public void setPageSize(int pageSize)
pageSize
- the number of rows to render in a Grid page.public int getPageSize()
public void setAction(String action)
action
- the name of the action to invoke in order to Page a gridpageAction
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"); }
public String getAction()
public void setRenderInFooter(boolean renderInFooter)
renderInFooter
- true
to render the pager at the
end of the grid; false othrewise.public boolean getRenderInFooter()
true
if a pager will render at the end of the
grid; false otherwise.public void setRenderInHeader(boolean renderInHeader)
renderInHeader
- true
to render the pager before the
grid; false otherwise.public boolean getRenderInHeader()
true
if a pager will render before the grid;
false otherwise.protected void localRelease()
localRelease
in class GridComponent
protected int renderStartTag(int state)
renderStartTag
in class StructuredBaseTag
state
- the containing Grid's current render state
protected int renderEndTag(int state) throws javax.servlet.jsp.JspException
Grid.HEAD_PAGER
,
and the pager should be rendered in the header, the pager is rendered;
if the grid state is Grid.FOOT_PAGER
,
and the pager should be rendered in the footer, the pager is rendered.
renderEndTag
in class StructuredBaseTag
state
- the containing Grid's current render state
javax.servlet.jsp.JspException
|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |