[Seaside] Re: Help with understanding how #call: works

Malte Zacharias malte.zacharias at nordakademie.de
Sun Feb 24 23:45:24 UTC 2008


Hey Jeffrey,

>> Yep, that's how it's done. You only need to include those components 
>> in children which are going to be rendered the next time the component 
>> implementing children is rendered. (E.g. if you have html render: 
>> aComponent within the rendering code you need to include it) A call 
>> actually replaces the component that calls another with the called 
>> component (until the called component answers).
> In this case, would you have to included the called element in the 
> parent's children list?

In which of the two cases ;)?
1.If component a calls b: No
  a>>children
	^#()

  Happens when you call a component within a callback Block usually or
  within a Task, e.g.:
  a>>renderContentOn: html
  	html anchor callback: [ self call: b ]; with: 'Call b'.

2.If component a causes b to be *rendered* within a: Yes.
  a>>children
	^#( b )

This happens when you display b like this:
  a>>renderContentOn: html
  	html heading level:1; with: 'Blablabla'.
  	html render: b.

I hope this clears it up a bit..


More information about the seaside mailing list