[Seaside] Help understanding WATableReport
s002 at landr.net
Thu Aug 26 10:25:57 CEST 2004
radoslav hodnicak wrote:
>On Wed, 25 Aug 2004, LK wrote:
>>Thanks for the step-by-step. My tableReport now works. One question on
>>sorting. I have to convert date fields to Strings to get them to sort.
>>Is there a way to reformat the Date, say to 'YYYYMMMDD' format?
>Date today yyyymmdd
>(you should really learn how to find such answers yourself. Is it that
>hard to open browser on class Date and look what methods are there?)
No, it's not. And that is precisely what I spent several hours doing.
The only method that I could get to work through seaside was #asString.
So, I thought that there must be some magic that only the experts know
about. Clicking on the Sort link above my date or time columns returns a
' Dates are not indexable' error. I inferred from this, that dates could
not be sorted. Converting them to strings removed the error, which
re-inforced my belief.
>but you don't have to convert dates to strings to have them sorted.
>Notice in my last example that my data were numbers but the columns
>sorted anyway. Anything that understands #<= can be sorted. The
>rest can be made sortable using sortBlock: when creating WAReportColumn
I can see that #sortBlock: assigns an object. But, what does that object
have to look like to make a WAReportColumn sortable? Something that is
intuitively obvious for an expert, is frustratingly obtuse to a novice.
But, you must be getting tired of dealing with novices, so I'm not
expecting a reply. Thank you. You have been a great help so far.
More information about the Seaside