org.rhq.enterprise.gui.legacy.taglib.display
Class ColumnTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.rhq.enterprise.gui.legacy.taglib.display.ColumnTag
- All Implemented Interfaces:
- Serializable, Cloneable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- LocalizedColumnTag
public class ColumnTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
- implements Cloneable
This tag works hand in hand with the SmartListTag to display a list of objects. This describes a column of data in
the SmartListTag. There can be any (reasonable) 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.
Usage:
Attributes:
property - the property method that is called to retrieve the information to be displayed in this column. This
method is called on the current object in the iteration for the given row. The property format is in typical struts
format for properties (required) showHideProperty - the property that is called to retrieve the information to be
displayed as a hidden layer. The data in this property will be displayed beneath the data specified in the property
field when the show/hide buttons are manipulated. title - the title displayed for this column. if this is omitted
then the property name is used for the title of the column (optional) nulls - by default, null values don't appear in
the list, by setting viewNulls to 'true', then null values will appear as "null" in the list (mostly useful for
debugging) (optional) width - the width of the column (gets passed along to the html td tag). (optional) group - the
grouping level (starting at 1 and incrementing) of this column (indicates if successive contain the same values, then
they should not be displayed). The level indicates that if a lower level no longer matches, then the matching for
this higher level should start over as well. If this attribute is not included, then no grouping is performed.
(optional) decorator - a class that should be used to "decorate" the underlying object being displayed. If a
decorator is specified for the entire table, then this decorator will decorate that decorator. (optional) autolink -
if set to true, then any email addresses and URLs found in the content of the column are automatically converted into
a hypertext link. href - if this attribute is provided, then the data that is shown for this column is wrapped inside
a tag with the url provided through this attribute. Typically you would use this attribute along with one of
the struts-like param attributes below to create a dynamic link so that each row creates a different URL based on the
data that is being viewed. (optional) paramId - The name of the request parameter that will be dynamically added to
the generated href URL. The corresponding value is defined by the paramProperty and (optional) paramName attributes,
optionally scoped by the paramScope attribute. (optional) paramName - The name of a JSP bean that is a String
containing the value for the request parameter named by paramId (if paramProperty is not specified), or a JSP bean
whose property getter is called to return a String (if paramProperty is specified). The JSP bean is constrained to
the bean scope specified by the paramScope property, if it is specified. If paramName is omitted, then it is assumed
that the current object being iterated on is the target bean. (optional) paramProperty - The name of a property of
the bean specified by the paramName attribute (or the current object being iterated on if paramName is not provided),
whose return value must be a String containing the value of the request parameter (named by the paramId attribute)
that will be dynamically added to this href URL. (optional) paramScope - The scope within which to search for the
bean specified by the paramName attribute. If not specified, all scopes are searched. If paramName is not provided,
then the current object being iterated on is assumed to be the target bean. (optional) maxLength - If this attribute
is provided, then the column's displayed is limited to this number of characters. An elipse (...) is appended to the
end if this column is linked, and the user can mouseover the elipse to get the full text. (optional) maxWords - If
this attribute is provided, then the column's displayed is limited to this number of words. An elipse (...) is
appended to the end if this column is linked, and the user can mouseover the elipse to get the full text. (optional)
- See Also:
- Serialized Form
| 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 |
| 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 interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
ColumnTag
public ColumnTag()
setProperty
public void setProperty(String v)
getOnClick
public String getOnClick()
setOnClick
public void setOnClick(String onClick)
setShowHideProperty
public void setShowHideProperty(String v)
setTitle
public void setTitle(String v)
setNulls
public void setNulls(String v)
setSort
public void setSort(String v)
setAutolink
public void setAutolink(String v)
setGroup
public void setGroup(String v)
setIsShowHideColumn
public void setIsShowHideColumn(boolean v)
setHref
public void setHref(String v)
setParamId
public void setParamId(String v)
setParamName
public void setParamName(String v)
setParamProperty
public void setParamProperty(String v)
setParamScope
public void setParamScope(String v)
setMaxLength
public void setMaxLength(int v)
setMaxWords
public void setMaxWords(int v)
setWidth
public void setWidth(String v)
setAlign
public void setAlign(String v)
setBackground
public void setBackground(String v)
setBgcolor
public void setBgcolor(String v)
setHeight
public void setHeight(String v)
setNowrap
public void setNowrap(String v)
setValign
public void setValign(String v)
setStyleClass
public void setStyleClass(String v)
setHeaderStyleClass
public void setHeaderStyleClass(String v)
setValue
public void setValue(Object v)
setDoubleQuote
public void setDoubleQuote(String v)
setDecorator
public void setDecorator(ColumnDecorator v)
getProperty
public String getProperty()
getShowHideProperty
public String getShowHideProperty()
getTitle
public String getTitle()
getNulls
public String getNulls()
getSort
public String getSort()
getAutolink
public String getAutolink()
getGroup
public String getGroup()
getIsShowHideColumn
public boolean getIsShowHideColumn()
getHref
public String getHref()
getParamId
public String getParamId()
getParamName
public String getParamName()
getParamProperty
public String getParamProperty()
getParamScope
public String getParamScope()
getMaxLength
public int getMaxLength()
getMaxWords
public int getMaxWords()
getWidth
public String getWidth()
getAlign
public String getAlign()
getBackground
public String getBackground()
getBgcolor
public String getBgcolor()
getHeight
public String getHeight()
getNowrap
public String getNowrap()
getValign
public String getValign()
getStyleClass
public String getStyleClass()
getHeaderStyleClass
public String getHeaderStyleClass()
getValue
public Object getValue()
getDoubleQuote
public String getDoubleQuote()
getDecorator
public ColumnDecorator getDecorator()
getDecoratorClass
public String getDecoratorClass()
setDecoratorClass
public void setDecoratorClass(String decoratorClass)
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
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
- Throws:
javax.servlet.jsp.JspException - if this tag is being used outside of a tag.
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
release
public void release()
- called by the jsp framework to release state.
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag- Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport
getCellAttributes
protected String getCellAttributes()
throws javax.servlet.jsp.JspException
- Takes all the column pass-through arguments and bundles them up as a string that gets tacked on to the end of the
td tag declaration.
- Returns:
- the td tag attributes
- Throws:
javax.servlet.jsp.JspException
replacePropertyIfPossible
public String replacePropertyIfPossible(String input,
javax.servlet.jsp.PageContext pageContext)
toString
public String toString()
- Returns a String representation of this Tag that is suitable for printing while debugging. Where the placeholders
in brackets are replaced with their appropriate instance variables
- Overrides:
toString in class Object
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.