BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.databinding.grid.column
Class GridColumn

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag
                  extended by com.bea.wlw.netui.tags.databinding.grid.GridComponent
                      extended by com.bea.wlw.netui.tags.databinding.grid.column.GridColumn
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
FormattableColumn

public abstract class GridColumn
extends GridComponent

The abstract base class for all column tags that can be children of the Columns tag. This tag defines the basic lifecycle methods of a grid column:

These methods are called on a column tag as the Grid transitions between its rendering states. The renderHeaderCell() method is called in the Grid's Grid.HEADER state, and the renderDataCell() and renderFooterCell() methods are called during the Grid's Grid.ROWS and Grid.FOOTER lifecycle states respectively.

This tag extends GridComponent and overrides the valid container type for subclasses. GridColumn types must be nested within a Columns tag.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
styleClassPrefixNoNoNo
A partial name of a CSS style class that can be used to stylize the header, data, and footer regions of a column. The rest of the actual CSS class rendered for these regions is created by appending -td-header, -td-data, and -td-footer, respectively to the value of the styleClassPrefix property.

See Also:
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
GridColumn()
           
 
Method Summary
protected  Columns getColumns()
          Get the Columns parent of this tag.
 String getStyleClassPrefix()
          Get the CSS style class for this grid column.
protected  Class getValidContainerType()
          Set the required parent type for this tag to the Columns tag.
protected  void localRelease()
          Reset all of the fields of this tag.
protected  void prepare()
          Implementation of the StructuredBaseTag.prepare() method.
protected  String renderCloseCellTag()
           
protected abstract  String renderDataCell()
          Render the contents of this GridColumn for each dataset item into each cell in the column.
protected  String renderDataCellTag()
           
protected  int renderEndTag(int state)
          Implementation of the StructuredBaseTag.renderStartTag(int) method for all GridColumn subclasses.
protected abstract  String renderFooterCell()
          Render the contents of this GridColumn in the footer cell.
protected  String renderFooterCellTag()
           
protected abstract  String renderHeaderCell()
          Render the contents of this GridColumn in the header cell.
protected  String renderHeaderCellTag()
           
protected  String renderOpenCellTag()
           
protected  int renderStartTag(int gridState)
          Default implementation of the StructuredBaseTag.renderStartTag(int) method for all GridColumns that returns SKIP_BODY.
 void setStyleClassPrefix(String styleClassPrefix)
           Set the style class prefix that is used to render table cell style information for the header, data, and footer cells of this HTML table column.
 
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, verifyAttributes, verifyStructure
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getTagName, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
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

GridColumn

public GridColumn()
Method Detail

getStyleClassPrefix

public String getStyleClassPrefix()
Get the CSS style class for this grid column. The value of this attribute is used as the prefix for the actual CSS class that is rendered for each part of the column, the header, data cells, and footer. The suffixes -td-header, -td-data, and -td-footer are appended to this style class prefix to create the style classes that should appear in a CSS.

Returns:
the CSS style class for this column

setStyleClassPrefix

public void setStyleClassPrefix(String styleClassPrefix)

Set the style class prefix that is used to render table cell style information for the header, data, and footer cells of this HTML table column. The styleClassPrefix will be used in conjunction with a suffix to create style class names that are rendered inside of the <td> tags for each cell in this column. The value of this property overrides any value set on the Columns.setStyleClassPrefix(java.lang.String) tag.

Assuming the value of this property is foo, the style class names rendered for each part of the column are:

Column RegionStyle class
Headerfoo-td-header
Datafoo-td-data
Footerfoo-td-footer

Parameters:
styleClassPrefix - the name of a style class that will be qualified with a suffix to name a CSS style class rendered for the header, data, and footer regions in a grid column.
Beadoc.attributedescription:

The style class prefix used to make the style class name in the header, data, and footer cells. The styleClassPrefix will be concatinated with a suffix to create style class names that are rendered inside of the <td> tags for each cell in this column.

Assuming the value of this attribute is foo, the style class names rendered for each part of the column are shown in the table below.

Column RegionStyle class
Headerfoo-td-header
Datafoo-td-data
Footerfoo-td-footer

Beadoc.attributesyntaxvalue:
string_styleClassPrefix
Beadoc.databindable:
false

localRelease

protected void localRelease()
Reset all of the fields of this tag.

Overrides:
localRelease in class GridComponent

renderHeaderCell

protected abstract String renderHeaderCell()
                                    throws javax.servlet.jsp.JspException
Render the contents of this GridColumn in the header cell. The header cell is the first HTML cell in the column.

Throws:
javax.servlet.jsp.JspException - if an error occurs that can not be reported in the page

renderDataCell

protected abstract String renderDataCell()
                                  throws javax.servlet.jsp.JspException
Render the contents of this GridColumn for each dataset item into each cell in the column.

Throws:
javax.servlet.jsp.JspException - if an error occurs that can not be reported in the page

renderFooterCell

protected abstract String renderFooterCell()
                                    throws javax.servlet.jsp.JspException
Render the contents of this GridColumn in the footer cell. The footer cell is the last HTML cell in the column.

Throws:
javax.servlet.jsp.JspException - if an error occurs that can not be reported in the page

prepare

protected void prepare()
Implementation of the StructuredBaseTag.prepare() method. This method finds the parent Columns tag and references it locally so that subclasses can access the Columns tag easily.

Overrides:
prepare in class GridComponent

getColumns

protected final Columns getColumns()
Get the Columns parent of this tag.


renderStartTag

protected int renderStartTag(int gridState)
Default implementation of the StructuredBaseTag.renderStartTag(int) method for all GridColumns that returns SKIP_BODY. Subclasses that need to process their body, for example to read formatters or URL parameters should override this method.

Specified by:
renderStartTag in class StructuredBaseTag
Parameters:
gridState - the current rendering state of the containing Grid
Returns:
SKIP_BODY;

renderEndTag

protected final int renderEndTag(int state)
                          throws javax.servlet.jsp.JspException
Implementation of the StructuredBaseTag.renderStartTag(int) method for all GridColumn subclasses. This method performs the rendering lifecycle for all GridColumn instances; depending on the Grid's current render state, specified with the stateparameter, a different method is called on the subclasses to render a different part of a GridColumn.
Grid Lifecycle StateGridColumn Lifecycle Method
HEADERrenderHeaderCell()
ROWSrenderDataCell()
FOOTERrenderFooterCell()
Subclasses implements these methods in order to render their implementation specific contents into the content buffer of the parent Columns tag.

Specified by:
renderEndTag in class StructuredBaseTag
Parameters:
state - the current rendering state of the containing Grid
Returns:
EVAL_PAGE
Throws:
javax.servlet.jsp.JspException - if an error occurs that can not be reported on the page

getValidContainerType

protected Class getValidContainerType()
Set the required parent type for this tag to the Columns tag. A GridColumn used outside of this required parent tag will report an error.

Overrides:
getValidContainerType in class GridComponent
Returns:
a class that is a valid container type for this tag

renderHeaderCellTag

protected String renderHeaderCellTag()

renderDataCellTag

protected String renderDataCellTag()

renderFooterCellTag

protected String renderFooterCellTag()

renderOpenCellTag

protected String renderOpenCellTag()

renderCloseCellTag

protected String renderCloseCellTag()

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.