[Seaside] REST-ful urls

John Thornborrow john at pinesoft.co.uk
Mon Jun 4 09:23:40 UTC 2007


The #controller returns an instance of my own-made controller class.
This class returns (via #answer:) an instance of the subcomponent to be
rendered.
The dictionary is simply a registry, within my
RootClass>>#renderContentOn: method, I use:

---
html render: (self registry at: 'content')
---

I did not know it broke initialisation! I thought that would only happen
if I called #isolate: like so:

---
self isolate: [
    self call: controller]
---

Thanks,
John

www.pinesoft.co.uk

Lukas Renggli wrote:
>>     self registry at: 'content' put: (self call: controller)
>
> I don't understand what you put into that dictionary? #call: does not
> return immediately and will break the initialization of your session.
> I guess this is also the reason for the strange behavior you encounter
> with the URL.
>
> If I understand your intention correctly, this should be written as:
>
>    self registry at: 'content' put: controller.
>    self show: controller.
>
>> updateUrl: aUrl
>>     aUrl addToPath: self content url
>
> Don't forget to call super, just in case ...
>
> 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