[Seaside] notifying all the visible components before and after a
request is received
Martin Rubi
mrubi at fibertel.com.ar
Wed Apr 16 18:09:14 UTC 2008
Hi.
I'd like to notify all of the visible presenters before and after a request is handled.
Conceptually, it would be something like this:
-------
MySession>>handleRequest: aRequest
"This is not code, only an intention of what I would like to do"
| answer |
self root visiblePresentersDo: [:each | each beforeRequestHandling].
answer := super handleRequest: aRequest.
self root visiblePresentersDo: [:each | each afterRequestHandling].
^answer
-------
the reason to do that is that I have some WAComponents of mine which have to lock a resource during the rendering and the callbacks handling. Right now, I'm locking and releasing the resource every time I need to (for instance, in the #renderContentOn: method, but also inside every callback), but I would prefer each component to do it automatically during each request, so I can fogert about it.
The question is: can something like that be done (I mean, would it work for scriptacolous callbacks too and that sort of things) ? And if it is, where and how should I do it ?
thanks in advance
martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080416/29573161/attachment.htm
More information about the seaside
mailing list