Seaside components within Pier, and their state.
Lukas Renggli
renggli at gmail.com
Sat Dec 19 17:25:43 MET 2009
I've committed Pier-Seaside-lr.445 that is supposed to fix the issue
with the state (as well as some other minor problems with cookies and
restful URLs):
Name: Pier-Seaside-lr.445
Author: lr
Time: 19 December 2009, 5:03:04 pm
UUID: 7fcd6bbf-2855-47aa-9a3b-afc1a2855371
Ancestors: Pier-Seaside-lr.444
- fixes issue where components lost state when PRRestfulSession was
used (http://code.google.com/p/pier/issues/detail?id=110)
Lukas
2009/12/18 Nick Brown <nickbrown at fastmail.fm>:
> On 18/12/2009 17:45, Lukas Renggli wrote:
>>
>> 2009/12/18 Nick Brown<nickbrown at fastmail.fm>:
>>
>>>
>>> Referring to the model from the view, I see that the PBHtmlView class is
>>> using #find: to locate any instance of its model class within the tree.
>>> That seems a bit, um, unpredictable for my purpose. Is it a good
>>> practice to refer back to the model from the view by calling "self
>>> context structure", or is there a better way of doing it?
>>>
>>
>> In MVC the view knows the model, not the other way round though.
>>
>
> Yes, that's what I'm talking about.
>
>> The reason for #find: is that the blog aggregates its children the
>> posts, as well as the posts need to know the blog they are contained
>> in.
>>
>>
>
> Ah.
>
>> BTW, I spent half an hour in a cafe here figuring out the problem of
>> the components loosing state. Looks like the RESTful URL introduces a
>> subtle problem here. As a quick workaround I suggest that you go to
>> the Seaside application configuration and change the session class
>> from PRRestfulSession to WASession. Clear all cookies in your web
>> browser and clear all sessions by evaluating "WARegistry
>> clearAllHandlers". Then it should work again.
>>
>> Lukas
>>
>>
>
> Thanks for looking into that, and for the advice. I'll have a go at adapting
> my classes along these lines on Monday.
>
> Cheers,
> Nick
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the smallwiki
mailing list