> MyParentComponent>>renderContentOn: html
> html render: (
> ChildComponentA new
> onAnswer: [ :val | self answer: val ];
> yourself).
> html render: (
> ChildComponentB new
> onAnswer: [ :val | self answer: val];
> yourself)
No component instantiation in the render method! Like this you get new
components every time you hit refresh or perform an action on the
page. This certainly does not work as expected.
You probably want something like this:
MyPageComponent>>initialize
super initialize.
childA := ChildComponentA new
onAnswer: [ :val | self answer: val ];
yourself.
childB := ChildComponentB new
onAnswer: [ :val | self answer: val ];
yourself.
MyPageComponent>>children
^ Array with: childA with: childB
MyPageComponent>>renderContentOn: html
html render: childA.
html render: childB
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside