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 ExpressionColumn

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
                          extended by com.bea.wlw.netui.tags.databinding.grid.column.FormattableColumn
                              extended by com.bea.wlw.netui.tags.databinding.grid.column.ExpressionColumn
All Implemented Interfaces:
Formattable, HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class ExpressionColumn
extends FormattableColumn

A column that can use expressions in addition to formatters to format the value of a data cell. The expression column enables combining data from different fields of the current data item or even from different expression contexts into a value for the cell. An expression column is not sortable or filterable.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
titleNoNoNo
The text that will be rendered in the header for this column.
valueNoNoYes
The expression value that can contain expressions that reference data in the current data item. The result of the expression evaluation will be rendered in the data cell.

See Also:
Grid, Serialized Form
Example:
Given a data item that has a lastName field and a firstName field, the following would render these together in a single cell:
    <netui-data:expessionColumn value="{container.item.lastName},
         {container.item.firstName}"
         title="Last Name, First Name"
         />

Sample Code

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/grid/grid.jsp
Beadoc.tagdescription:

A column that can use data binding expressions to determine the value of a data cell. The expression column enables combining data from different fields of the current data item or even from different expression contexts into a value for the cell. An expression column is not sortable or filterable.


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
ExpressionColumn()
           
 
Method Summary
 String getTagName()
          Get the name of this tag.
 String getTitle()
          Get the title rendered in the header cell of this column.
 String getValue()
          Get the value of this tag.
protected  void localRelease()
          Reset all of the fields of this tag.
 String renderDataCell()
          Render a cell for the "current" data item.
 String renderFooterCell()
          Render the footer.
 String renderHeaderCell()
          Render the header cell for this column.
 void setTitle(String title)
          Set the title rendered in the header cell of this column.
 void setValue(String value)
          Set the value of this tag.
 
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, prepare, renderCloseCellTag, renderDataCellTag, renderEndTag, 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, 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, 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

ExpressionColumn

public ExpressionColumn()
Method Detail

getTagName

public String getTagName()
Get the name of this tag. This is used to identify the type of this tag for reporting tag errors.

Specified by:
getTagName in class AbstractBaseTag
Returns:
a constant String representing the name of this tag.

setTitle

public void setTitle(String title)
Set the title rendered in the header cell of this column.

Parameters:
title - the title of the column
Beadoc.attributedescription:
The text to render in the column header.
Beadoc.attributesyntaxvalue:
string_title
Beadoc.databindable:
false

getTitle

public String getTitle()
Get the title rendered in the header cell of this column.

Returns:
the title of the colum

setValue

public void setValue(String value)
Set the value of this tag. The value may contain an expression(s) that will be evaluated before the data for each item in the Grid's data set is rendered. The databinding expression container may be used to access the "current" data item that is being rendered. For example, the expression container.item accesses the current data item.

Parameters:
value - the value of this tag. This attribute may contain expression(s).
Beadoc.attributedescription:
The value may contain an expression(s) that will be evaluated before the data for each item in the <netui-data:grid>'s data set is rendered. The databinding expression {container.item} may be used to access the current data item that is being rendered.
Beadoc.attributesyntaxvalue:
string_or_expression_value
Beadoc.databindable:
true

getValue

public String getValue()
Get the value of this tag.

Returns:
the value of this tag

renderHeaderCell

public String renderHeaderCell()
Render the header cell for this column. The title attribute is rendered in the header of an ExpressionColumn.

Specified by:
renderHeaderCell in class GridColumn
Returns:
the String content that should be buffered for this tag

renderDataCell

public String renderDataCell()
                      throws javax.servlet.jsp.JspException
Render a cell for the "current" data item. The value attribute is first evaluated as an expression, then formatted using any contained Formatter tags, and is finally returned to be buffered. If errors occur during the process of expression evaluation on the value attribute, these errors are reported in the page.

Specified by:
renderDataCell in class GridColumn
Returns:
the String content that should be buffered for this tag
Throws:
javax.servlet.jsp.JspException - if an error occurs that can not be reported in the page

renderFooterCell

public String renderFooterCell()
Render the footer. This footer contains no text.

Specified by:
renderFooterCell in class GridColumn
Returns:
the emtpy string

localRelease

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

Overrides:
localRelease in class FormattableColumn

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