[Seaside] chained WATasks need to be in #children?
michal-list at auf.net
michal-list at auf.net
Tue Feb 1 18:24:16 UTC 2011
hi -
I stumbled upon this surprising property of WATask in Seaside3 today (because it broke my old code): chaining two
tasks works only if the second is returned by #children (though non-tasks don't need to be returned by #children).
Could someone confirm this, and maybe explain it? Here is a much simplified scenario to reproduce the issue:
Task1>>go
self call: Task2 new
Task2>>go
self inform: Time now printString
The above doesn't work, failing with WATaskNotDelegated. This on the other hand works:
Task>>go
self call: Component new
Component>>renderContentOn: html
html heading: Time now printString
Furthermore, as soon as Task1 is modified to answer the Task2 instance in its #children, the first example starts
working (regardless of whether it is the same Task2 instance across calls, or a new one on each cycle).
So it looks like "chained tasks count as children components" and must be declared as such in #children, while
"chained non-task components do not count as children components" (and hence do not need to be answered in
#children). I couldn't find any info on that in tutorials or googles, so: is that right? And if so, why is there
this asymmetry?
thanks,
Michal
More information about the seaside
mailing list