public class ColumnTag extends javax.servlet.jsp.tagext.BodyTagSupport implements Cloneable
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:
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)
| Constructor and Description |
|---|
ColumnTag() |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValuepublic void setProperty(String v)
public String getOnClick()
public void setOnClick(String onClick)
public void setShowHideProperty(String v)
public void setTitle(String v)
public void setNulls(String v)
public void setSort(String v)
public void setAutolink(String v)
public void setGroup(String v)
public void setIsShowHideColumn(boolean v)
public void setHref(String v)
public void setParamId(String v)
public void setParamName(String v)
public void setParamProperty(String v)
public void setParamScope(String v)
public void setMaxLength(int v)
public void setMaxWords(int v)
public void setWidth(String v)
public void setAlign(String v)
public void setBackground(String v)
public void setBgcolor(String v)
public void setHeight(String v)
public void setNowrap(String v)
public void setValign(String v)
public void setStyleClass(String v)
public void setHeaderStyleClass(String v)
public void setValue(Object v)
public void setDoubleQuote(String v)
public void setDecorator(ColumnDecorator v)
public String getProperty()
public String getShowHideProperty()
public String getTitle()
public String getNulls()
public String getSort()
public String getAutolink()
public String getGroup()
public boolean getIsShowHideColumn()
public String getHref()
public String getParamId()
public String getParamName()
public String getParamProperty()
public String getParamScope()
public int getMaxLength()
public int getMaxWords()
public String getWidth()
public String getAlign()
public String getBackground()
public String getBgcolor()
public String getHeight()
public String getNowrap()
public String getValign()
public String getStyleClass()
public String getHeaderStyleClass()
public Object getValue()
public String getDoubleQuote()
public ColumnDecorator getDecorator()
public String getDecoratorClass()
public void setDecoratorClass(String decoratorClass) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionpublic int doEndTag()
throws javax.servlet.jsp.JspException
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.
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - if this tag is being used outside of a public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspExceptionpublic void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class javax.servlet.jsp.tagext.BodyTagSupportprotected String getCellAttributes() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionpublic String replacePropertyIfPossible(String input, javax.servlet.jsp.PageContext pageContext)
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.