|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.displaytag.decorator.TableDecorator
org.displaytag.decorator.TotalTableDecorator
public class TotalTableDecorator
A table decorator which adds rows with totals (for column with the "total" attribute set) and subtotals (grouping by the column with a group="1" attribute).
| Field Summary | |
|---|---|
protected TableModel |
tableModel
The table model. |
| Constructor Summary | |
|---|---|
TotalTableDecorator()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
createTotalRow(boolean grandTotal)
|
java.lang.String |
finishRow()
After every row completes we evaluate to see if we should be drawing a new total line and summing the results from the previous group. |
java.lang.Object |
getDecoratedObject()
returns the decorated object. |
javax.servlet.jsp.PageContext |
getPageContext()
returns the page context. |
boolean |
hasGetterFor(java.lang.String propertyName)
Check if a getter exists for a given property. |
void |
init(javax.servlet.jsp.PageContext pageContext,
java.lang.Object decorated)
Deprecated. use #init(PageContext, Object, TableModel) |
void |
init(javax.servlet.jsp.PageContext context,
java.lang.Object decorated,
TableModel tableModel)
Initialize the TableTecorator instance. |
boolean |
searchGetterFor(java.lang.String propertyName)
Looks for a getter for the given property using introspection. |
void |
setSubtotalLabel(java.lang.String subtotalLabel)
Setter for subtotalLabel. |
void |
setTotalLabel(java.lang.String totalLabel)
Setter for totalLabel. |
java.lang.String |
startRow()
Called at the beginning of a row. |
| Methods inherited from class org.displaytag.decorator.TableDecorator |
|---|
addRowClass, addRowId, displayGroupedValue, endOfGroup, evaluate, finish, getCurrentRowObject, getListIndex, getViewIndex, initRow, isLastRow, startOfGroup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TableModel tableModel
| Constructor Detail |
|---|
public TotalTableDecorator()
| Method Detail |
|---|
public void setSubtotalLabel(java.lang.String subtotalLabel)
subtotalLabel.
subtotalLabel - The subtotalLabel to set.public void setTotalLabel(java.lang.String totalLabel)
totalLabel.
totalLabel - The totalLabel to set.
public void init(javax.servlet.jsp.PageContext context,
java.lang.Object decorated,
TableModel tableModel)
context - PageContextdecorated - decorated object (usually a list)tableModel - table modelDecorator.init(PageContext, Object, TableModel)public java.lang.String startRow()
TableDecorator
startRow in class TableDecoratorpublic final java.lang.String finishRow()
finishRow in class TableDecoratorprotected java.lang.String createTotalRow(boolean grandTotal)
public void init(javax.servlet.jsp.PageContext pageContext,
java.lang.Object decorated)
pageContext - PageContextdecorated - decorated object (usually a list)init(PageContext, Object, TableModel)public javax.servlet.jsp.PageContext getPageContext()
public java.lang.Object getDecoratedObject()
public boolean hasGetterFor(java.lang.String propertyName)
propertyName - name of the property to check
public boolean searchGetterFor(java.lang.String propertyName)
propertyName - name of the property to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||