On Wed, Jul 1, 2009 at 1:47 PM, Lukas Renggli<renggli(a)gmail.com> wrote:
My question
is, am I breaking something I'm not seeing (as apparently
things works as I want) by doing that ? is that the correct way to do
it ?
I don't know, but certainly sounds cool. If you commit the changes I
am sure people will quickly find out ;-)
ah :)
well, really this is all I'm doing... I followed ramon's blog
explanations, and added a subclass of WASession with the following
methods:
returnResponse: aResponse
(self currentRequest cookieAt: self application handlerCookieName)
ifNil: [ aResponse addCookie: self sessionCookie ].
^ super returnResponse: aResponse
actionUrlForKey: aString
| url |
url := super actionUrlForKey: aString.
(self currentRequest cookieAt: self application handlerCookieName)
ifNotNil: [ url parameters removeKey: self application
handlerField ].
^ url
Then I modified visitInternalInk in PRReferenceRender like this:
visitInternalLink: aLink
| anchor |
anchor := self anchorFor: aLink.
anchor class: 'internal'; goto: (self contextForLink: aLink).
aLink anchor isNil ifFalse: [
anchor url fragment: (aLink anchor
select: [ :each | each isAlphaNumeric ]) ].
anchor url: 'http://test.roard.com/seaside/pier', aLink reference.
(aLink hasCounter and: [ html callbacks isKindOf: WACallbackRegistry
]) ifTrue: [
anchor url addParameter: (html callbacks
registerCallback: [ aLink incrementCounter ]) ].
anchor with: [ self visitLink: aLink ]
This can certainly be cleaned/simplified.
--
Nicolas Roard
"I love deadlines. I like the whooshing sound
they make as they fly by." -- Douglas Adams