com.sas.taglib.servlet.tbeans.tableview
Class ColumnTag

com.sas.taglib.servlet.tbeans.tableview.ColumnTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class ColumnTag

ColumnTag is the tag handler class for the sas:Column custom tag . ColumnTag is invoked by the JSP page to evaluate the sas:Column custom tag during the execution of the page. Tag handler methods are called by the JSP page implementation class at various points during the evaluation of the tag. The tag handler methods in turn call methods on the underlying Transformation Bean object, TableColumn, to execute the methods.

If you need to extend or modify the functionality of the sas:Column custom tag, you can subclass this tag handler class.

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Refer to the Custom Tag Library Reference for usage information on the sas:Column custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site.

To specify a custom column (i.e. a column not in the data model), then set the modelIndex to -1.

See Also:
TableColumn, Serialized Form

Field Summary
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS, RB_KEY
 
Constructor Summary
ColumnTag()
           
 
Method Summary
protected  void applyAttributes()
          Apply Column properties to the underlying com.sas.servlet.tbeans.tableview.TableColumn object
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Processes the start tag for this instance.
 java.lang.String getHeaderValue()
          Returns the headerValue property of the ColumnTag.
 java.lang.String getHold()
          Determines if the column is held and on which side.
 int getModelIndex()
          Returns the modelIndex property of the ColumnTag.
 java.lang.String getSort()
          Determines if the column is sorted and which direction.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 void setHeaderValue(java.lang.String headerValue)
          Sets the headerValue property of the ColumnTag.
 void setHold(java.lang.String hold)
          Determines if the column is held and on which side.
 void setModelIndex(int modelIndex)
          Sets the modelIndex property of the ColumnTag.
 void setSort(java.lang.String sort)
          Determines if the column is sorted and which direction.
 
Methods inherited from class com.sas.taglib.BaseBodyTag
doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getLocale, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setLocale, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate
 

Constructor Detail

ColumnTag

public ColumnTag()
Method Detail

initialize

protected void initialize(boolean includeAttributes)
Initializes attributes and variables for this tag handler.

Overrides:
initialize in class BaseBodyTag
Parameters:
includeAttributes - Set to true if attributes are to be set to default values.

setModelIndex

public void setModelIndex(int modelIndex)
Sets the modelIndex property of the ColumnTag.

Parameters:
modelIndex - The index of the column in the data model to map to this column in the column model. This number is 0-based since this is the column index from the data model. The viewer's column indexes are 1-based. If set to -1 the column will be a custom column and not map to any column in the data model.
See Also:
getModelIndex()

getModelIndex

public int getModelIndex()
Returns the modelIndex property of the ColumnTag.

Returns:
the index of the column in the data model
See Also:
setModelIndex(int)

setHeaderValue

public void setHeaderValue(java.lang.String headerValue)
Sets the headerValue property of the ColumnTag.

Parameters:
headerValue - The value to display as the column header in the TableView. If not set then the data model's column name will be used.
See Also:
getHeaderValue()

getHeaderValue

public java.lang.String getHeaderValue()
Returns the headerValue property of the ColumnTag.

Returns:
the value to display as the column header
See Also:
setHeaderValue(java.lang.String)

applyAttributes

protected void applyAttributes()
                        throws javax.servlet.jsp.JspException
Apply Column properties to the underlying com.sas.servlet.tbeans.tableview.TableColumn object

Overrides:
applyAttributes in class BaseBodyTag
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.
See Also:
BaseBodyTag.setInstantiate(boolean), TagSupport.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException

getHold

public java.lang.String getHold()
Determines if the column is held and on which side.

Returns:
Which side to hold the column.

setHold

public void setHold(java.lang.String hold)
Determines if the column is held and on which side.

Parameters:
hold - Which side to hold the column.

getSort

public java.lang.String getSort()
Determines if the column is sorted and which direction.

Returns:
if the column is sorted and which direction.

setSort

public void setSort(java.lang.String sort)
Determines if the column is sorted and which direction.

Parameters:
sort - if the column is sorted and which direction.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.