GridColumn Class

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

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 GridColumn.renderHeaderCell() method is called in the Grid's Grid.HEADER state, and the GridColumn.renderDataCell() and GridColumn.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.


Hierarchy
Object
  TagSupport
    BodyTagSupport
      AbstractBaseTag
        StructuredBaseTag
          GridComponent
            GridColumn
All Implemented Interfaces

BodyTag, IterationTag, Serializable, Tag
Direct Known Subclasses

FormattableColumn

Field Summary

   
Fields from  com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag
EMPTY_STRING
 
Fields from  com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, CLASS, ID, JAVASCRIPT_STATUS, NAME, NETUI_UNIQUE_CNT, ONCLICK, ONDBLCLICK, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, STYLE, TABINDEX
 
Fields from  javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields from  javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 

Constructor Summary

GridColumn()

 

Method Summary

protected final Columns
getColumns()
Get the Columns parent of this tag.
public 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 final 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.
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.

 
Methods from  com.bea.wlw.netui.tags.databinding.grid.GridComponent
getCurrentRenderState, getGrid, getGridContext,
 
Methods from  com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag
addContent, doEndTag, doStartTag, getContent, getCurrentRenderState, getValidContainerType, localRelease, prepare, verifyAttributes, verifyStructure
 
Methods from  com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, evaluateAttributeToString, filter, filter, getJavaScriptUtils, getNearestForm, getScriptReporter, getTagName, getUserLocale, localRelease, registerTagError, release, renderAttribute, rewriteName, write
 
Methods from  javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods from  javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.jsp.tagext.BodyTag
doInitBody, setBodyContent
 
Methods from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

GridColumn

public GridColumn()
 

Method Detail

getColumns() Method

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


getStyleClassPrefix() Method

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

getValidContainerType() Method

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
GridComponent.getValidContainerType()

Returns

a class that is a valid container type for this tag

localRelease() Method

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

Overrides
GridComponent.localRelease()

prepare() Method

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
GridComponent.prepare()

renderCloseCellTag() Method

protected String renderCloseCellTag()

renderDataCell() Method

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

Exceptions

JspException
if an error occurs that can not be reported in the page

renderDataCellTag() Method

protected String renderDataCellTag()

renderEndTag(int) Method

protected final int renderEndTag(int state)
throws 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
HEADERGridColumn.renderHeaderCell()
ROWSGridColumn.renderDataCell()
FOOTERGridColumn.renderFooterCell()
Subclasses implements these methods in order to render their implementation specific contents into the content buffer of the parent Columns tag.

Overrides
StructuredBaseTag.renderEndTag(int)

Parameters

state
the current rendering state of the containing Grid

Returns

EVAL_PAGE

Exceptions

JspException
if an error occurs that can not be reported on the page

renderFooterCell() Method

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

Exceptions

JspException
if an error occurs that can not be reported in the page

renderFooterCellTag() Method

protected String renderFooterCellTag()

renderHeaderCell() Method

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

Exceptions

JspException
if an error occurs that can not be reported in the page

renderHeaderCellTag() Method

protected String renderHeaderCellTag()

renderOpenCellTag() Method

protected String renderOpenCellTag()

renderStartTag(int) Method

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.

Overrides
StructuredBaseTag.renderStartTag(int)

Parameters

gridState
the current rendering state of the containing Grid

Returns

SKIP_BODY;

setStyleClassPrefix(String) Method

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(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.