| rendering |
| renderColumn: aColumn row: aRow on: html
|
|text|
text _ aColumn textForRow: aRow.
text isEmpty ifTrue: [text _ ' '].
html tableData: [
aColumn canChoose
ifFalse: [html text: text]
ifTrue: [html anchorWithAction: [self chooseRow: aRow column: aColumn] text: text]
]
|
| renderContentOn: html
|
html attributeAt: 'cellspacing' put: 0; attributeAt: 'cellpadding' put: 5.
html table: [
self renderTableHeaderOn: html.
self renderRowsOn: html.
self renderTableFooterOn: html.
]
|
| renderFooterForColumn: aColumn on: html
|
html tableHeading: [ html text: (aColumn totalForRows: rows)]
|
| renderHeaderForColumn: aColumn on: html
|
html tableHeading: [
aColumn canSort
ifTrue: [
html anchorWithAction: [self sortColumn: aColumn] text: aColumn title]
ifFalse: [
html text: aColumn title]
]
|
| renderRowNumber: index item: row on: html
|
html attributeAt: 'bgcolor' put: (self colorForRowNumber: index).
html tableRow: [ columns do: [:ea | self renderColumn: ea row: row on: html] ]
|
| renderRowsOn: html
|
self rows withIndexDo: [:row :i | self renderRowNumber: i item: row on: html ]
|
| renderTableFooterOn: html
|
html tableRow: [ columns do: [ :ea | self renderFooterForColumn: ea on: html] ]
|
| renderTableHeaderOn: html
|
html tableRow: [ columns do: [ :ea | self renderHeaderForColumn: ea on: html] ]
|