Seaside components within Pier, and their state.
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
Time: 19 December 2009, 5:03:04 pm
- fixes issue where components lost state when PRRestfulSession was
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
>> 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.
> Thanks for looking into that, and for the advice. I'll have a go at adapting
> my classes along these lines on Monday.
> Magritte, Pier and Related Tools ...
More information about the smallwiki