[Seaside] Help understanding WATableReport

Avi Bryant avi at beta4.com
Thu Aug 26 12:37:05 CEST 2004


On Aug 24, 2004, at 4:01 PM, Dan Winkler wrote:

> 4.  Create a #children method of FactorialTableComponent:
>
> children
> 	^Array with: report.
>
> This lets Seaside know what the subcomponents of 
> FactorialTableComponent are, in this case just the one 
> WATableComponent.  (I'm not sure why this is required by the Seaside 
> framework -- it seems it would know when you call render: what your 
> subcomponents are?)

This is a bit of a FAQ.  The problem is that Seaside knows to know what 
your subcomponents are *before* you call #render: with them.  You can 
think of #children as sort of a sneak-preview of the render pass: "I'm 
going to be rendering these subcomponents, so be prepared".

> And that's it.  Now you can see your application in your web browser 
> and click column headings to change the sort order.  (Note: I wish the 
> framework would make each new sort also subsort by the previous sort 
> so that for example if I have a table of dates and times I could sort 
> first by time and then by date to get chronological order.  I can 
> simulate most of this behavior by passing in sortblocks but it gets 
> messy and doesn't really do what you want when columns are sorted in 
> reverse order.)

Yes, that would be a good addition.  To be honest, I haven't used 
TableReport for quite a while and so it's been stagnating.  If someone 
is actually using it and wants to improve it, I'd be happy to integrate 
some patches.

Avi



More information about the Seaside mailing list