|
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.Objectjavax.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.column.GridColumn
com.bea.wlw.netui.tags.databinding.grid.column.FormattableColumn
com.bea.wlw.netui.tags.databinding.grid.column.SortFilterColumn
public abstract class SortFilterColumn
The abstract base class of a grid column that is sortable and / or filterable.
Depending on the type of the data set to which a grid tag is bound, the
data set may be sortable and / or filterable. Columns of this type have attributes
that determine these capabilities by using the attributes set on a GridColumn tag
and the parent Columns tag.
If a particular GridColumn is determined to be either sortable or filterable,
the header of the column is rendered with HTML anchor tags (links) that will
parameterize the URL to preform the sort or filter.
For a sortable column, the title of the column will be rendered as a link which, if clicked on, will set a sort in the URL parameters that preserves all previous sorts / filters and changes or sets the direction of a sort on this column.
For a filterable columm, a small filter icon will be rendered next to the column name that will display a UI which allows a filter, including the filter operation and filter value, to be set on the column.
In both the sort and filter case, the URL for a current page is changed in order to display the correct view on a data set on the next page.
Required resources:
The JavaScript file _grid.js must be included in any page with a com.bea.wlw.netui.tags.databinding.Grid if
the Grid includes any SortFilterColumn that has filtering enabled.
|
| Attribute Descriptions | ||||
|---|---|---|---|---|
| Attribute | Required | Runtime Expression Evaluation | Data Bindable | |
| filterable | No | No | No | |
A boolean that enables this column to be sortable. This attribute
overrides the Columns.setFilterable(boolean)
attribute of the Columns tag.
| ||||
| filterAction | No | No | No | |
The action that will be executed if this GridColumn is sorted. This attribute
overrides the Columns.setFilterAction(String)
attribute of the Columns tag.
| ||||
| name | No | No | No | |
When rendering in Grid.ROWS
state, this is the name of the data from the current data item that is rendered
for this row.
| ||||
| sortable | No | No | No | |
A boolean that enables this column to be sortable. This attribute
overrides the Columns.setSortable(boolean)
attribute of the Columns tag.
| ||||
| sortAction | No | No | No | |
The action that will be executed if this GridColumn is sorted. This attribute
overrides the Columns.setSortAction(String)
attribute of the Columns tag.
| ||||
| title | No | No | Yes | |
| The title that will be rendered in the header of this tag | ||||
SortFilterService,
Serialized Form| 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 | |
|---|---|
SortFilterColumn()
|
|
| Method Summary | |
|---|---|
protected String |
calculateURL(String destination,
Map queryParams)
Given a destination, action or href, and a list of query parameters, calculate the URL that will be rendered for a sort or filter link. |
boolean |
canFilter()
Determine the absolute ability of a SortFilterColumn to be filtered. |
boolean |
canSort()
Determine the absolute ability of a SortFilterColumn to be filtered. |
String |
computeFilterAction()
Get the absolute filter action for a SortFilterColumn. |
String |
computeSortAction()
Get the absolute sort action for a SortFilterColumn. |
String |
getFilterAction()
Get the action that will be invoked if this column is filtered. |
String |
getName()
Get the name of the data that is rendered by this column. |
String |
getSortAction()
Get the action that will be invoked if this column is sorted. |
String |
getTitle()
Get the title rendered in the header cell of this column. |
protected String |
getTitleText()
|
boolean |
isFilterable()
Get whether or not this column can be filtered. |
boolean |
isSortable()
Get whether or not this column can be sorted. |
protected void |
localRelease()
Reset all of the fields of this tag. |
protected void |
prepare()
Implementation of the StructuredBaseTag.prepare()
method. |
protected String |
renderFilterMarkup(GridContext gridContext,
String realColumnName,
String readableColumnName,
int columnType)
Render the filter mark-up that will enable this column to be filtered. |
String |
renderHeaderCell()
Render the header of a column that may be sortable or filterable. |
protected String |
renderSortMarkup(String gridName,
String columnName,
String columnTitle,
int columnType)
Render the sort mark-up that will enable this column to be sorted. |
void |
setFilterable(boolean filterable)
Set whether or not this column can be filtered. |
void |
setFilterAction(String filterAction)
Set the action that will be invoked if this column is sorted. |
void |
setName(String name)
Set the name of the data that is referenced by this column. |
void |
setSortable(boolean sortable)
Set whether or not this column can be sorted. |
void |
setSortAction(String sortAction)
Set the action that will be invoked if this column is sorted. |
void |
setTitle(String title)
Set the title rendered in the header cell of this column. |
protected void |
verifyAttributes()
Ensure that the attributes set on the tag are valid. |
| Methods inherited from class com.bea.wlw.netui.tags.databinding.grid.column.FormattableColumn |
|---|
addFormatter, format, renderStartTag |
| Methods inherited from class com.bea.wlw.netui.tags.databinding.grid.column.GridColumn |
|---|
getColumns, getStyleClassPrefix, getValidContainerType, renderCloseCellTag, renderDataCell, renderDataCellTag, renderEndTag, renderFooterCell, renderFooterCellTag, renderHeaderCellTag, renderOpenCellTag, setStyleClassPrefix |
| Methods inherited from class com.bea.wlw.netui.tags.databinding.grid.GridComponent |
|---|
getCurrentRenderState, getGrid, getGridContext |
| Methods inherited from class com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag |
|---|
addContent, doEndTag, doStartTag, getContent, 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 SortFilterColumn()
| Method Detail |
|---|
public void setTitle(String title)
title - the title of the columnpublic String getTitle()
public void setName(String name)
Grid.ROWS
render state.
name - the name of the data to extract from the current data item.public String getName()
public void setFilterable(boolean filterable)
filterable - a boolean that sets this capability. If true this
column may be filterable; otherwise it is not.public boolean isFilterable()
true if this column is filterable; false otherwise.public void setSortable(boolean sortable)
sortable - a boolean that sets this capability. If true
this column may be filterable; otherwise it is not.public boolean isSortable()
true if this coolumn is sortable; false otherwise.public void setSortAction(String sortAction)
PageFlowController
in the JSP's directory.
sortAction - the action that will be called to sort the columnpublic String getSortAction()
public void setFilterAction(String filterAction)
PageFlowController
in the JSP's directory.
filterAction - the action that will be called to filter the columnpublic String getFilterAction()
protected void localRelease()
localRelease in class FormattableColumn
public String renderHeaderCell()
throws javax.servlet.jsp.JspException
renderHeaderCell in class GridColumnjavax.servlet.jsp.JspException - if an error occurs that can not be shown in the pagepublic boolean canFilter()
Columns tag.
The rules for determining whether a column is filterable are:
public boolean canSort()
Columns tag.
The rules for determining whether a column is sortable are:
public String computeFilterAction()
Columns tag. The rules for
determining the filter action are:
public String computeSortAction()
Columns tag. The rules for
determining the sort action are:
protected void verifyAttributes()
throws javax.servlet.jsp.JspException
canFilter() method, the
computeFilterAction() must return an action.canSort() method, the
computeSortAction() must return an action.
verifyAttributes in class StructuredBaseTagjavax.servlet.jsp.JspException - if an error occurs that can not be reported in the pageprotected String getTitleText()
protected final String calculateURL(String destination,
Map queryParams)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected final String renderFilterMarkup(GridContext gridContext,
String realColumnName,
String readableColumnName,
int columnType)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected final String renderSortMarkup(String gridName,
String columnName,
String columnTitle,
int columnType)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionprotected void prepare()
GridColumnStructuredBaseTag.prepare()
method. This method finds the parent Columns
tag and references it locally so that subclasses can access the Columns tag easily.
prepare in class GridColumn
|
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 | |||||||||