[Seaside] [3.0] Adding param to URL on session expiry?

Julian Fitzell jfitzell at gmail.com
Wed May 5 17:33:50 UTC 2010


No, I think we (I?) had imagined people implementing more or less complete
ResponseGenerators themselves. But that said, there's no reason not to do a
refactoring like the below the make it easier to change just that.

I would suggest extracting all the creation and modification of the URL into
a method #expiryUrl, which you could override to call "^ super expiryUrl
addParameter: ...". Would that work or do you need to do your modification
at that exact point? If that's ok, maybe you could file an issue in the
tracker?

Julian

On Wed, May 5, 2010 at 1:20 PM, Boris Popov, DeepCove Labs (YVR) <
boris at deepcovelabs.com> wrote:

>  I'd like to addParameter: 'expired' to the redirect URL when sessions
> expire, is there a clean way of customizing the URL on the subclass of
> WAResponseGenerator without copy-pasting the whole body of #expiredKey? I'm
> thinking of,
>
>
>
> WAResponseGenerator>>expiredKey
>
>
>
>                 | url |
>
>                 self request isXmlHttpRequest
>
>                                 ifTrue: [ ^ self forbidden ].
>
>                 url := WAUrl new.
>
>                 url addAllToPath: self request url path.
>
>                 *self expiryPathOn: url.*
>
>                 url takeServerParametersFromRequest: self request.
>
>                 self request isGet ifTrue: [
>
>                                 self request fields keysAndValuesDo: [ :key
> :value |
>
>                                                 (url isSeasideField: key)
>
>                                                                 ifFalse: [
> url addField: key value: value ] ] ].
>
>                 self response redirectTo: url
>
>
>
> Then you'd only need to add your own,
>
>
>
> MyOwnResponseGenerator>>expiryPathOn: url
>
>
>
>                 url addParameter: 'expired'
>
>
>
> Perhaps I'd overlooked some other way of achieving this w/o modifying core?
>
>
>
> Regards,
>
>
>
> -Boris
>
>
>
> --
>
> DeepCove Labs Ltd.
>
> +1 (604) 689-0322
>
> 4th floor, 595 Howe Street
>
> Vancouver, British Columbia
>
> Canada V6C 2T5
>
> http://tinyurl.com/r7uw4
>
>
>
> PacNet Services (Europe) Ltd.
>
> +353 (0)61 714-360
>
> Shannon Airport House, SFZ
>
> County Clare, Ireland
>
> http://tinyurl.com/y952amr
>
>
>
> CONFIDENTIALITY NOTICE
>
>
>
> This email is intended only for the persons named in the message header.
> Unless otherwise indicated, it contains information that is private and
> confidential. If you have received it in error, please notify the sender and
> delete the entire message including any attachments.
>
>
>
> Thank you.
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100505/48688ade/attachment.htm


More information about the seaside mailing list