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
Class Columns

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

public class Columns
extends GridComponent

This tag is a container for the columns that will render the header, data, and footer for each column in a Grid. Tags contained immediately within the Columns tag should all be of type GridColumn. Those tags are:

Additionally, the Columns tag has the capability to set "global" properties for all of the contained GridColumn tags. Specifically, the ability to sort / filter and the actions associated with performing these operations can be set here. All sortable and filterable GridColumn tags that are contained within a Columns tag may use these values or may override them if a column needs to be handled specially.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
filterableNoNoNo
A boolean that enables all of the contained GridColumn objects that are SortFilterColumn types to be filterable. Individual GridColumn tags can override this to enable / disable filtering.
filterActionNoNoNo
The action that will be executed if any filterable GridColumn tags are filtered. Individual GridColumn tags can override this to call a different action.
sortableNoNoNo
A boolean that enables all of the contained GridColumn objects that are SortFilterColumn types to be sortable. Individual GridColumn tags can override this to enable / disable sorting.
sortActionNoNoNo
The action that will be executed if any sortable GridColumn tags are sorted. Individual GridColumn tags can override this to call a different action.
styleClassPrefixNoNoNo
A style class prefix that will be applied to all cells in all columns inside of a GridColumns tag. This attribute provides a way to customize the header, data, and footer cells of all grid columns with a single attribute. See GridColumn.setStyleClassPrefix(java.lang.String) for more information on how columns apply CSS styles to cells.

See Also:
Grid, Serialized Form
Example:

This sample shows a <netui-data:columns> tag used in a <netui-data:grid> tag.

 <netui-data:grid dataSource="{pageFlow.allRows}" name="{pageFlow.gridName}">
     <netui-data:gridStyle styleClassPrefix="gridStyle"/>
     <netui-data:pager renderInHeader="true" action="pageAction" renderInFooter="true"/>
     <netui-data:columns filterAction="begin" sortAction="begin">
         <netui-data:anchorColumn action="detailsItems" addRowId="true" title="Details"/>
         <netui-data:anchorColumn action="updateItems" addRowId="true" title="Edit"/>
         <netui-data:basicColumn filterable="true" title="Itemnumber" sortable="true" name="itemnumber"/>
         <netui-data:basicColumn filterable="true" title="Itemname" sortable="true" name="itemname"/>
         <netui-data:basicColumn filterable="true" title="Quantityavailable" sortable="true" name="quantityavailable"/>
         <netui-data:basicColumn filterable="true" title="Price" sortable="true" name="price"/>
     </netui-data:columns>
 </netui-data:grid>
 

Sample Code

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

Beadoc.see:
<netui-data:grid> Tag Sample
Beadoc.tagdescription:

This tag is a container for the columns that render the header, data, and footer for each column in a Grid tag. Tags contained immediately within the <netui-data:columns> tag should be of the following types:

Additionally, the <netui-data:columns> tag has the capability to set global properties for all of the contained column tags. Specifically, the ability to sort/filter and the actions associated with performing these operations can be set here. All sortable and filterable column tags that are contained within a <netui-data:columns> tag may use the global properties or may override them if a column needs to be handled specially.


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
Columns()
           
 
Method Summary
 String getFilterAction()
          Get the action that will be invoked if a contained GridColumn tag is filtered.
 String getSortAction()
          Get the action that will be invoked if a contained GridColumn tag is sorted.
 String getStyleClassPrefix()
          Get the default style class prefix that is applied to all columns in the grid.
 String getTagName()
          Get the name of this tag.
 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  int renderEndTag(int gridState)
           
protected  int renderStartTag(int gridState)
           
 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 a contained GridColumn tag is filtered.
 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 a contained GridColumn tag is sorted.
 void setStyleClassPrefix(String styleClassPrefix)
          Set a default style class prefix that is applied to all columns in the grid.
 
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 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

Columns

public Columns()
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.

setStyleClassPrefix

public void setStyleClassPrefix(String styleClassPrefix)
Set a default style class prefix that is applied to all columns in the grid. See GridColumn.setStyleClassPrefix(java.lang.String) for more information. & @param styleClassPrefix a style class prefix that is used by all columns in a grid

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

getStyleClassPrefix

public String getStyleClassPrefix()
Get the default style class prefix that is applied to all columns in the grid. See GridColumn.setStyleClassPrefix(java.lang.String) for more information.

Returns:
the style class prefix that is used by all columns in a grid.

setFilterable

public void setFilterable(boolean filterable)
Set whether or not this column can be filtered. This attribute will help determine the capability of a contained GridColumn tags.

Parameters:
filterable - a boolean that sets this capability. If true this column may be filterable; otherwise it is not.
Beadoc.attributedescription:
Boolean. Determines whether or not the column is filterable
Beadoc.attributesyntaxvalue:
boolean_filterable
Beadoc.databindable:
false

isFilterable

public boolean isFilterable()
Get whether or not this column can be filtered.

Returns:
true if this column is filtered; false otherwise.

setSortable

public void setSortable(boolean sortable)
Set whether or not this column can be sorted. This attribute will help determine the capability of a contained GridColumn tags.

Parameters:
sortable - a boolean that sets this capability. If true this column may be sortable; otherwise it is not.
Beadoc.attributedescription:
Boolean. Determines whether or not the column is sortable.
Beadoc.attributesyntaxvalue:
boolean_sortable
Beadoc.databindable:
false

isSortable

public boolean isSortable()
Get whether or not this column can be sorted.

Returns:
true if this column is filtered; false otherwise.

setSortAction

public void setSortAction(String sortAction)
Set the action that will be invoked if a contained GridColumn tag is sorted. The use of this attribute requires the presence of a PageFlowController in the JSP's directory. This attribute will help determine the sort action of a contained GridColumn tags.

Parameters:
sortAction - the action that will be called to sort the column
Beadoc.attributedescription:
The action method that will handle the sort operation.
Beadoc.attributesyntaxvalue:
string_sortAction
Beadoc.databindable:
false

getSortAction

public String getSortAction()
Get the action that will be invoked if a contained GridColumn tag is sorted.

Returns:
the action that will be called to sort a GridColumn inside of a Columns tag.

setFilterAction

public void setFilterAction(String filterAction)
Set the action that will be invoked if a contained GridColumn tag is filtered. The use of this attribute requires the presence of a PageFlowController in the JSP's directory. This attribute will help determine the sort action of a contained GridColumn tags.

Parameters:
filterAction - the action that will be called to filter the column
Beadoc.attributedescription:
The action method that will handle the filter operation.
Beadoc.attributesyntaxvalue:
string_filterAction
Beadoc.databindable:
false

getFilterAction

public String getFilterAction()
Get the action that will be invoked if a contained GridColumn tag is filtered.

Returns:
the action that will be called to sort a GridColumn inside of a Columns tag.

localRelease

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

Overrides:
localRelease in class GridComponent

renderStartTag

protected int renderStartTag(int gridState)
Specified by:
renderStartTag in class StructuredBaseTag

renderEndTag

protected int renderEndTag(int gridState)
Specified by:
renderEndTag in class StructuredBaseTag

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