[Seaside] Anchor Actions in Rendered Components
Giger, Bengt
bengt.giger at id.ethz.ch
Fri May 7 22:04:45 CEST 2004
Avi Bryant wrote:
>
> MyShell>>initialize
> myComp := MyComp1 new
>
> MyShell>>renderContentOn: html
> html render: myComp
>
> MyShell>>children
> ^ Array with: myComp
>
>> "Bill Holloway" <holloway at io.com> writes:
>>
>>> MyShell>>renderContentOn: html
>>> html render: MyComp1 new.
>>>
>>> MyComp1 is also a subclass of WAComponent. Its rendering method is
>>>
>>> MyComp1>>renderContentOn: html
>>> html anchorWithAction: [Transcript show: 'in comp1 render'] text:
>>> 'do it'
>>>
>>> When I click this link, nothing shows in the Transcript. If I put
>>> such a
>>> Transcript>>show: link in MyShell>>renderContentOn:, the Transcript does
>>> show the desired text. Ideas? Thanks!
I just jumped into Seaside and am still collecting basic knowledge.
But I have played around a little with WACounter. If I subclass
WAComponent as MyClass and render it like this
MyClass>>renderContentOn: html
waCounterInstance renderContentOn: html
the counter perfectly works. But if I do
html render: waCounterInstance
or
html divNamed: 'counter' with: waCounterInstance
no more changes happen to the display (except if I use the same instance
for all rendering: clicking on one of the first links changes all three
counter displays, as expected).
As with Bills example, there is no need or no data to return. Perhaps
I am missed something (I *certainly* did...) but I wonder why the
Transcript should print a line of text if I implement the children
method?
Bengt
More information about the Seaside
mailing list