[Seaside] Using URL Parameters
jfitzell at gmail.com
Mon Nov 23 21:47:54 UTC 2009
On Sun, Nov 22, 2009 at 1:54 AM, Lukas Renggli <renggli at gmail.com> wrote:
>> to extract parameters from URL, you have to make your own
>> WAApplication subclass, where override 'handleRequest: aRequest'. Something
>> like this:
>> handleRequest: aRequest
>> | blogdate |
>> blogdate := aRequest at: 'blogdate'.
>> ^ super handleRequest: aRequest
> Subclassing WAApplication is discouraged and normally not necessary
> (Seaside 2.6 and earlier required that). Simply override
> #initialRequest: in your root component.
> Have a look at WABrowser and the other components that override
> #initialRequest: and #updateRoot: to see some examples. This works
> exactly the same in Seaside 2.8 and 3.0.
His example included a session key in the URL. If that session key is
valid, #initialRequest: would not be called since it is not the first
request to the session. In Seaside 2.8 you can use "self session
currentRequest"; in Seaside 3.0 "self requestContext request".
More information about the seaside