Hi! Is this stuff the same of the new Pier 1.2 ANN about clean URLs ?

Thanks,

Mariano

On Wed, Jul 1, 2009 at 2:17 PM, Adrian Lienhard <adi@netstyle.ch> wrote:
For what its worth, I described how we implemented clean URLs in cmsbox.com some time ago:

http://lists.squeakfoundation.org/pipermail/seaside-dev/2008-August/001012.html

Cheers,
Adrian


On Jul 1, 2009, at 15:54 , Nicolas Roard wrote:

On Wed, Jul 1, 2009 at 1:47 PM, Lukas Renggli<renggli@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
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki