Holds informations for a table row.
| Method from org.displaytag.model.Row Detail: |
public void addCell(Cell cell) {
this.staticCells.add(cell);
}
|
public List getCellList() {
return this.staticCells;
}
getter for the list of Cell object. |
public String getCloseTag() {
return TagConstants.TAG_TR_CLOSE;
}
|
public ColumnIterator getColumnIterator(List columns) {
return new ColumnIterator(columns, this);
}
|
public Object getObject() {
return this.rowObject;
}
getter for the object holding values for the current row. |
public String getOpenTag() {
Map rowAttributes = new HtmlAttributeMap();
MultipleHtmlAttribute cssAttribute = new MultipleHtmlAttribute(this.tableModel.getProperties().getCssRow(
this.rowNumber));
if (this.tableModel.getTableDecorator() != null)
{
try
{
String addStyle = this.tableModel.getTableDecorator().addRowClass();
if (StringUtils.isNotBlank(addStyle))
{
cssAttribute.addAttributeValue(addStyle);
}
String id = this.tableModel.getTableDecorator().addRowId();
if (StringUtils.isNotBlank(id))
{
rowAttributes.put(TagConstants.ATTRIBUTE_ID, id);
}
}
catch (NoSuchMethodError e)
{
// this catch is here to allow decorators compiled with displaytag 1.0 work with 1.1
// since the addRowClass() and addRowId() are new in displaytag 1.1 earlier decorators could throw
// a NoSuchMethodError... be nice with them till a next major release
}
}
if (!cssAttribute.isEmpty())
{
rowAttributes.put(TagConstants.ATTRIBUTE_CLASS, cssAttribute);
}
StringBuffer tag = new StringBuffer();
tag.append(TagConstants.TAG_OPEN);
tag.append(TagConstants.TAGNAME_ROW);
tag.append(rowAttributes.toString());
tag.append(TagConstants.TAG_CLOSE);
return tag.toString();
}
Writes the open <tr> tag. |
protected TableModel getParentTable() {
return this.tableModel;
}
Getter for the table model the row belongs to. |
public int getRowNumber() {
return this.rowNumber;
}
Getter for the row number. |
protected void setParentTable(TableModel table) {
this.tableModel = table;
}
Setter for the table model the row belongs to. |
public void setRowNumber(int number) {
this.rowNumber = number;
}
Setter for the row number. |
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) //
.append("rowNumber", this.rowNumber) //$NON-NLS-1$
.append("rowObject", this.rowObject) //$NON-NLS-1$
.toString();
}
|