[Seaside] Oddities with WATableReport

radoslav hodnicak rh at 4096.sk
Fri Oct 15 12:18:15 CEST 2004


On 14 Oct 2004, Samuel Tardieu wrote:

> Using Seaside2.6a-avi.6, I have the following code in one of my
> components:
>
> renderContentOn: html
>     | columns report |
>     columns :=3D (OrderedCollection new)
>                 add: (WAReportColumn selector: #date title: 'Date');
>                 add: (WAReportColumn selector: #sigle title: 'Sigle');
>                 add: (WAReportColumn selector: #groupe title: 'Groupe');
>                 add: (WAReportColumn selector: #intitule title: 'Intitul=
=C8');
>                 add: (WAReportColumn selector: #horaire title: 'Horaire')=
;
>                 add: (WAReportColumn selector: #salle title: 'Salle');
>                 add: (WAReportColumn selector: #enseignants
>                                      title: 'Enseignants');
>                 yourself.
>     report :=3D (WATableReport new)
>                 rows: entries;
>                 columns: columns.
>     html cssClass: #classes; render: report
>
> This does not behave as expected:
>
>   - columns are clickable as if they can be sorted but I get an error
>     when I click on the heading
>
>   - I never get the "classes" class on my <table>
>
> Any idea of why it could be so?

1) move the table report to an instvar, don't create a new one every time
2) create a method #children that returns an array with this table report
instance (this will fix the crash and get sorting to work too)
3) look in html source to see if/where the css class is set

rado



More information about the Seaside mailing list