Package org.displaytag.decorator
Class CheckboxTableDecorator
java.lang.Object
org.displaytag.decorator.TableDecorator
org.displaytag.decorator.CheckboxTableDecorator
A table decorator which adds checkboxes for selectable rows.
- Version:
- $Id$
- Author:
- Fabrizio Giustina
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finish()
Finish.Gets the checkbox.returns the decorated object.javax.servlet.jsp.PageContext
returns the page context.boolean
hasGetterFor
(String propertyName) Check if a getter exists for a given property.void
Deprecated.use #init(PageContext, Object, TableModel)void
init
(javax.servlet.jsp.PageContext pageContext, Object decorated, TableModel tableModel) Inits the.boolean
searchGetterFor
(String propertyName) Looks for a getter for the given property using introspection.void
setFieldName
(String fieldName) Setter forfieldName
.void
Setter forid
.Methods inherited from class org.displaytag.decorator.TableDecorator
addRowClass, addRowId, displayGroupedValue, endOfGroup, evaluate, finishRow, getCurrentRowObject, getListIndex, getViewIndex, initRow, isLastRow, startOfGroup, startRow
-
Field Details
-
tableModel
The table model.- Since:
- 1.1
-
-
Constructor Details
-
CheckboxTableDecorator
public CheckboxTableDecorator()
-
-
Method Details
-
setId
Setter forid
.- Parameters:
id
- The id to set.
-
setFieldName
Setter forfieldName
.- Parameters:
fieldName
- The fieldName to set.
-
init
public void init(javax.servlet.jsp.PageContext pageContext, Object decorated, TableModel tableModel) Inits the.- Parameters:
pageContext
- the page contextdecorated
- the decoratedtableModel
- the table model- See Also:
-
Decorator.init(javax.servlet.jsp.PageContext, java.lang.Object, org.displaytag.model.TableModel)
-
finish
public void finish()Finish.- Overrides:
finish
in classTableDecorator
- See Also:
-
getCheckbox
Gets the checkbox.- Returns:
- the checkbox
-
init
Deprecated.use #init(PageContext, Object, TableModel)Initialize the TableTecorator instance.- Parameters:
pageContext
- PageContextdecorated
- decorated object (usually a list)- See Also:
-
getPageContext
public javax.servlet.jsp.PageContext getPageContext()returns the page context.- Returns:
- PageContext
-
getDecoratedObject
returns the decorated object.- Returns:
- Object
-
hasGetterFor
Check if a getter exists for a given property. Uses cached info if property has already been requested. This method only check for a simple property, if pPropertyName contains multiple tokens only the first part is evaluated- Parameters:
propertyName
- name of the property to check- Returns:
- boolean true if the decorator has a getter for the given property
-
searchGetterFor
Looks for a getter for the given property using introspection.- Parameters:
propertyName
- name of the property to check- Returns:
- boolean true if the decorator has a getter for the given property
-