Method from org.displaytag.decorator.TableDecorator Detail: |
public String addRowClass() {
return null;
}
Call back to add an additional row class to the current row. |
public String addRowId() {
return null;
}
Call back to allow setting an "id" attribute on a row. |
public String displayGroupedValue(String cellValue,
short groupingStatus,
int columnNumber) {
if (groupingStatus == TableWriterTemplate.GROUP_END || groupingStatus == TableWriterTemplate.GROUP_NO_CHANGE)
{
return TagConstants.EMPTY_STRING;
}
else
{
return cellValue;
}
}
What value should I display in this cell? The default value for grouped columns is to not display any value if
the cellValue has not changed on an interior iteration. Only invoked for columns that are grouped. |
public void endOfGroup(String value,
int groupThatHasEnded) {
}
Called at the end of a group. Can be subclassed to provide specific data at the end of a row. |
protected Object evaluate(String propertyName) {
try
{
return LookupUtil.getBeanProperty(getCurrentRowObject(), propertyName);
}
catch (ObjectLookupException e)
{
return null;
}
}
Shortcut for evaluating properties in the current row object. Can be useful for implementing anonymous decorators
in jsp pages without having to know/import the decorated object Class. |
public void finish() {
this.currentRowObject = null;
super.finish();
}
Called at the end of evaluation. Can be subclassed to eventully clean up data. Always remember to also call
super.finish()! |
public String finishRow() {
return null;
}
Called at the end of a row. Can be subclassed to provide specific data at the end of a row |
public final Object getCurrentRowObject() {
return this.currentRowObject;
}
Get the object representing the current row. |
public final int getListIndex() {
return this.listIndex;
}
Return the index in the full list (view index + offset). Note that the index returned if from the sorted
list, and not from the original one. |
public final int getViewIndex() {
return this.viewIndex;
}
Return the index in the displayed list. |
public final void initRow(Object rowObject,
int currentViewIndex,
int currentListIndex) {
this.currentRowObject = rowObject;
this.viewIndex = currentViewIndex;
this.listIndex = currentListIndex;
}
Initialize the current row. Note this method is also called when sorting a table using a property supplied by the
table decorator, so the method could be called multiple times during rendering. When used to initialize sorting
the method is always called with 0, 0 as currentViewIndex and currentListIndex. |
public boolean isLastRow() {
return getListIndex() == this.tableModel.getRowListPage().size() - 1;
}
|
public void startOfGroup(String value,
int group) {
}
Indicates that we are begining a new group. |
public String startRow() {
return null;
}
Called at the beginning of a row. Can be subclassed to provide specific data at the beginning of a row |