[Seaside] Jumping to named Anchors

Julian Fitzell jfitzell at gmail.com
Thu Mar 12 22:36:17 UTC 2009


On Thu, Mar 12, 2009 at 11:25 PM, Ramon Leon <ramon.leon at allresnet.com> wrote:
>
> On Thu, Mar 12, 2009 at 2:42 PM, Julian Fitzell <jfitzell at gmail.com> wrote:
>>
>> On Thu, Mar 12, 2009 at 5:30 PM, Ramon Leon <ramon.leon at allresnet.com>
>> wrote:
>> > Try this instead.  In your callback method, as the last line, say
>> >
>> > self session jumpToAnchor: #anchorName
>>
>> Which is one of the remaining things on WASession in the bleeding edge
>> code that I still wish we could get rid of. If anyone has any
>> suggestions for how else to implement it in the context of 2.9 I would
>> be very happy to hear them. (this should really be a seaside-dev post
>> but since the thread started here...)
>>
>> Julian
>
> Well, start by saying what's wrong with it?  I use it, it fits well with the
> page centric view of things.  Or is it just because it's on the session and
> you guys have been cleaning that up?  Conceptually, to me anyway, this is
> something that belongs on the response.  It's a command I'd be giving to the
> current response so that the user see's what I want when the response
> renders.

Yes, exactly. It has nothing really to do with the Session. If it was
backtracked you could make an argument but then it gets reset in the
render phase and the render phase shouldn't be changing state.

I guess if I picture the render loop written out in pseudo code, a new
loop iteration is started at the end of the callback so to implement
it there you'd need a variable outside the scope of the loop. Which I
guess is an argument for it being on Session. :) Still feels ugly
though...

Julian


More information about the seaside mailing list