[Seaside] OK to directly call (#renderContentOn: html)
of sub-component ?
John Thornborrow
john at pinesoft.co.uk
Mon Jan 21 13:23:46 UTC 2008
It was a weak example, but you could also have:
initialize
child := ChildComponent new.
renderContentOn: html
html div
id: 'parent';
with: [ html render: (child options: #('some' 'options')) ]
where the options are of course variables and not static values.
Regards,
John.
www.pinesoft.co.uk
Lukas Renggli wrote:
>> renderContentOn: html
>> "Parent rendering.."
>> self div
>> id: 'parent';
>> with: [ | child |
>> "child rendering"
>> child := ChildComponent new options: #('some' 'options').
>> html render: child
>> ]
>
> Given that this creates a new component on every rendering pass
> (refresh), you will also loose the state that the child might want to
> store (for example the selected option).
>
> Cheers,
> Lukas
>
Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
More information about the seaside
mailing list