org.displaytag.tags
Class ColumnTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.displaytag.tags.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, MediaUtil.SupportsMedia
Direct Known Subclasses:
ELColumnTag

public class ColumnTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements MediaUtil.SupportsMedia

This tag works hand in hand with the TableTag to display a list of objects. This describes a column of data in the TableTag. There can be any number of columns that make up the list.

This tag does no work itself, it is simply a container of information. The TableTag does all the work based on the information provided in the attributes of this tag.

Version:
$Revision: 1097 $ ($Author: rapruitt $)
Author:
mraible, Fabrizio Giustina
See Also:
Serialized Form

Field Summary
 
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 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
ColumnTag()
           
 
Method Summary
 int doEndTag()
          Passes attribute information up to the parent TableTag.
 int doStartTag()
           
 java.util.List getSupportedMedia()
          Obtain the list of media types this object supports.
protected  TableTag getTableTag()
          Looks up the parent table tag.
 void release()
           
 void setAutolink(boolean value)
          setter for the "autolink" tag attribute.
 void setClass(java.lang.String value)
          setter for the "class" tag attribute.
 void setComparator(java.lang.Object comparatorObj)
          Set the comparator, classname or object.
 void setDecorator(java.lang.String value)
          setter for the "decorator" tag attribute.
 void setDefaultorder(java.lang.String value)
          sets the sorting order for the sorted column.
 void setEscapeXml(boolean value)
          setter for the "escapeXml" tag attribute.
 void setFormat(java.lang.String value)
          setter for the "format" tag attribute.
 void setGroup(int value)
          setter for the "group" tag attribute.
 void setHeaderClass(java.lang.String value)
          setter for the "headerClass" tag attribute.
 void setHeaderScope(java.lang.String value)
          setter for the "headerScope" tag attribute.
 void setHref(java.lang.String value)
          setter for the "href" tag attribute.
 void setMaxLength(int value)
          setter for the "maxLength" tag attribute.
 void setMaxWords(int value)
          setter for the "maxWords" tag attribute.
 void setMedia(java.lang.String media)
          Tag setter.
 void setNulls(boolean value)
          setter for the "nulls" tag attribute.
 void setParamId(java.lang.String value)
          setter for the "paramId" tag attribute.
 void setParamName(java.lang.String value)
          setter for the "paramName" tag attribute.
 void setParamProperty(java.lang.String value)
          setter for the "paramProperty" tag attribute.
 void setParamScope(java.lang.String value)
          setter for the "paramScope" tag attribute.
 void setProperty(java.lang.String value)
          setter for the "property" tag attribute.
 void setScope(java.lang.String value)
          setter for the "scope" tag attribute.
 void setSortable(boolean value)
          setter for the "sortable" tag attribute.
 void setSortName(java.lang.String sortName)
          sets the name given to the server when sorting this column
 void setSortProperty(java.lang.String value)
          setter for the "sortProperty" tag attribute.
 void setStyle(java.lang.String value)
          setter for the "style" tag attribute.
 void setSupportedMedia(java.util.List media)
          Configure the list of media types this object will support.
 void setTitle(java.lang.String value)
          setter for the "title" tag attribute.
 void setTitleKey(java.lang.String value)
          setter for the "titleKey" tag attribute.
 void setTotal(boolean totals)
          Setter for totals.
 void setUrl(java.lang.String value)
          setter for the "url" tag attribute.
 void setValue(java.lang.Object value)
          setter for the "value" tag attribute.
 java.lang.String toString()
           
 
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, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

ColumnTag

public ColumnTag()
Method Detail

setTotal

public void setTotal(boolean totals)
Setter for totals.

Parameters:
totals - the value

setProperty

public void setProperty(java.lang.String value)
setter for the "property" tag attribute.

Parameters:
value - attribute value

setValue

public void setValue(java.lang.Object value)
setter for the "value" tag attribute.

Parameters:
value - attribute value

setComparator

public void setComparator(java.lang.Object comparatorObj)
Set the comparator, classname or object.

Parameters:
comparatorObj - the comparator, classname or object

setTitle

public void setTitle(java.lang.String value)
setter for the "title" tag attribute.

Parameters:
value - attribute value

setFormat

public void setFormat(java.lang.String value)
setter for the "format" tag attribute.

Parameters:
value - attribute value

setNulls

public void setNulls(boolean value)
setter for the "nulls" tag attribute.

Parameters:
value - attribute value

setSortable

public void setSortable(boolean value)
setter for the "sortable" tag attribute.

Parameters:
value - attribute value

setAutolink

public void setAutolink(boolean value)
setter for the "autolink" tag attribute.

Parameters:
value - attribute value

setEscapeXml

public void setEscapeXml(boolean value)
setter for the "escapeXml" tag attribute.

Parameters:
value - attribute value

setGroup

public void setGroup(int value)
setter for the "group" tag attribute.

Parameters:
value - attribute value

setTitleKey

public void setTitleKey(java.lang.String value)
setter for the "titleKey" tag attribute.

Parameters:
value - property name

setHref

public void setHref(java.lang.String value)
setter for the "href" tag attribute.

Parameters:
value - attribute value

setUrl

public void setUrl(java.lang.String value)
setter for the "url" tag attribute. This has the same meaning of href, but prepends the context path to the given URI.

Parameters:
value - attribute value

setParamId

public void setParamId(java.lang.String value)
setter for the "paramId" tag attribute.

Parameters:
value - attribute value

setParamName

public void setParamName(java.lang.String value)
setter for the "paramName" tag attribute.

Parameters:
value - attribute value

setParamProperty

public void setParamProperty(java.lang.String value)
setter for the "paramProperty" tag attribute.

Parameters:
value - attribute value

setParamScope

public void setParamScope(java.lang.String value)
setter for the "paramScope" tag attribute.

Parameters:
value - attribute value

setScope

public void setScope(java.lang.String value)
setter for the "scope" tag attribute.

Parameters:
value - attribute value

setHeaderScope

public void setHeaderScope(java.lang.String value)
setter for the "headerScope" tag attribute.

Parameters:
value - attribute value

setMaxLength

public void setMaxLength(int value)
setter for the "maxLength" tag attribute.

Parameters:
value - attribute value

setMaxWords

public void setMaxWords(int value)
setter for the "maxWords" tag attribute.

Parameters:
value - attribute value

setStyle

public void setStyle(java.lang.String value)
setter for the "style" tag attribute.

Parameters:
value - attribute value

setClass

public void setClass(java.lang.String value)
setter for the "class" tag attribute.

Parameters:
value - attribute value

setHeaderClass

public void setHeaderClass(java.lang.String value)
setter for the "headerClass" tag attribute.

Parameters:
value - attribute value

setDecorator

public void setDecorator(java.lang.String value)
setter for the "decorator" tag attribute.

Parameters:
value - attribute value

setSortProperty

public void setSortProperty(java.lang.String value)
setter for the "sortProperty" tag attribute.

Parameters:
value - attribute value

getTableTag

protected TableTag getTableTag()
Looks up the parent table tag.

Returns:
a table tag instance.

setMedia

public void setMedia(java.lang.String media)
Tag setter.

Parameters:
media - the space delimited list of supported types

setSupportedMedia

public void setSupportedMedia(java.util.List media)
Description copied from interface: MediaUtil.SupportsMedia
Configure the list of media types this object will support.

Specified by:
setSupportedMedia in interface MediaUtil.SupportsMedia
Parameters:
media - The list of media types this object will support.
See Also:
MediaUtil.SupportsMedia.setSupportedMedia(java.util.List)

getSupportedMedia

public java.util.List getSupportedMedia()
Description copied from interface: MediaUtil.SupportsMedia
Obtain the list of media types this object supports.

Specified by:
getSupportedMedia in interface MediaUtil.SupportsMedia
Returns:
The list of media types this object supports.
See Also:
MediaUtil.SupportsMedia.getSupportedMedia()

setSortName

public void setSortName(java.lang.String sortName)
sets the name given to the server when sorting this column

Parameters:
sortName - name given to the server to sort this column

setDefaultorder

public void setDefaultorder(java.lang.String value)
                     throws InvalidTagAttributeValueException
sets the sorting order for the sorted column.

Parameters:
value - "ascending" or "descending"
Throws:
InvalidTagAttributeValueException - if value is not one of "ascending" or "descending"

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Passes attribute information up to the parent TableTag.

When we hit the end of the tag, we simply let our parent (which better be a TableTag) know what the user wants to do with this column. We do that by simple registering this tag with the parent. This tag's only job is to hold the configuration information to describe this particular column. The TableTag does all the work.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
int
Throws:
javax.servlet.jsp.JspException - if this tag is being used outside of a <display:list...> tag.
See Also:
Tag.doEndTag()

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport
See Also:
Tag.release()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doStartTag()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2002-2010 the Displaytag team. All Rights Reserved.