[Seaside] Detect the position of a page div
renggli at gmail.com
Tue Sep 22 19:56:31 UTC 2009
> So "#text:" doesn't expect the same thing as "#html:" then?
Nop, but you are right. Maybe that's not quite right what Seaside does here?
> Oh, also. I recall a comment somewhere that you can only register one
> callback on a class? Does that only apply to seaside components?
No, this has nothing to do with components.
You can only register one primary callback for an ajax object, e.g.
html jQuery ajax callback: [ ... ]; callback: [ ... ] " <-- wrong "
does not make sense, because Seaside returns a response after
processing the primary callback. However you can register as many
secondary callbacks as you want, e.g. to serialize values to the
html jQuery ajax " <-- correct "
callback: [ :v1 | "this is a secondary callback" ] value: ....;
callback: [ :v2 | "this is a secondary callback" ] value: ....;
html: [ :h | "this is a primary callback that generates html,
internally it calls #callback:" ];
Note that the primary callback is always evaluated last, whereas the
secondary callback are evaluated before in order they were defined.
Hope this helps?
More information about the seaside