[Seaside] Help with converting Gardner
Avi Bryant
avi.bryant at gmail.com
Sat Dec 18 01:40:08 CET 2004
On Sat, 18 Dec 2004 01:04:45 +0100, Avi Bryant <avi.bryant at gmail.com> wrote:
> On Fri, 17 Dec 2004 23:34:35 +0100, Cees de Groot <cg at cdegroot.com> wrote:
> But, yeah, the whole area of URL handling has been completely redone,
> so Gardner and Janus will definitely need some modification. I'll
> take a quick look and report back...
So, you have three problems, actually. The first one is that
#createRootFromRequest: isn't used anymore, though it's very easy to
revive - in your session subclass, just implement the following:
start: aRequest
(WARenderLoop new root: (self createRootFromRequest: aRequest)) run
The second problem is that the preferences system has been
considerably improved. You'll want a GWConfiguration subclass of
WASystemConfiguration to define all of your various prefs - see
David's tutorial at
http://www.shaffer-consulting.com/david/SeasideConfiguration/SeasideConfigurations.html
for more info.
The third problem is that #addToPath: isn't used any more. It now
works in a way that I think is more natural for wikis, which is that
the components themselves get to modify the URL based on their current
state. What you need to do is implement #updateUrl: on GWViewer,
probably like so:
updateUrl: aUrl
aUrl addToPath: self page title
The final question is how we integrate Janus with this. Somewhere,
obviously, we need to invoke JanusKom pageAt:put: - but where? Doing
it in #updateUrl: might be the easiest because we have access to the
full URL. We can use #urlString rather than #urlWithQueryString (or
#asString) to get it without the Seaside-specific query params. So:
updateUrl: aUrl
aUrl addToPath: self page title.
JanusKom pageAt: aUrl urlString put: (self staticVersionOf: self page)
That should be more or less it...
Avi
More information about the Seaside
mailing list