[Seaside] Re: Where is some definitive document on callback priorities, response priority

Julian Fitzell jfitzell at gmail.com
Sat Jun 25 20:22:53 UTC 2011

On Sat, Jun 25, 2011 at 4:41 AM, Fritz Schenk
<intrader.intrader at gmail.com>wrote:

> Julian Fitzell <jfitzell <at> gmail.com> writes:
> >
> >
> > Hi Fritz,For callback priority, just look at subclasses of WACallback
> (#priority
> method).I'm not sure what you mean by priority of responses...Julian
> Thanks Julian - I always enjoy your postings.

Thanks. :)

> I had looked at priority in the WACallback - I was looking fro some design
> or
> architectural  document. There was nothing to indicate that #cancelButton
> would
> set priority -5 (or what -5 means). And how does it affect AJAX which is
> also
> at -5. etc.

You're right - it's not well documented. I see there aren't even any class
comments in the Seaside-Core-Callbacks category...

The logic is in WACallback>>#<=

Basically, callbacks with a lower priority are executed first. If two
callbacks have the same priority, they will be evaluated by the order of
their keys (in other words, in the order they were created).

 As to #response, once you message #response, the rest of the processing is
> not done - callbacks,etc.

A request runs only until it generates a response, so once you call
#respond, that's definitely that. WAActionCallback and its subclasses all
signal a WARenderNotification when they are done, which normally aborts the
action phase and immediately begins rendering. So normally any callback with
a later priority than a triggered action callback will not get executed
(that's what prevents the WADefaultActionCallback from being executed unless
there's no other action callback).

Hope that helps,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110625/c5b21ae5/attachment.htm

More information about the seaside mailing list