[Seaside] Legacy system and Seaside
Thierry Thelliez
thierry.thelliez.tech at gmail.com
Wed Sep 9 23:05:00 UTC 2009
Thanks Boris, the example helps.
One more question. Can you pass a parameter within Seaside from one
page to another? I am not asking about the regular Seaside way. This
is in the context of an older application ported to Seaside.
Assuming that I have a regular Seaside page pointing to another page:
canvas anchor
callback: [ self show: LegacyPage new ];
with: 'LegacyApp'.
I would like to pass a variable to 'LegacyPage'. I implemented
'updateURL:' and 'initialRequest:' for LegacyPage (subclass of
WABrowser).
updateUrl: aUrl
super updateUrl: aUrl.
aUrl addParameter: 'v1' value: 'xyz'.
initialRequest: aRequest
super initialRequest: aRequest.
self halt: 'initialQuest'.
I never get to the halt above. What am I missing?
Thierry
On Wed, Sep 9, 2009 at 9:36 AM, Boris Popov<boris at deepcovelabs.com> wrote:
> Thierry,
>
> Have you tried implementing the following on your root component and if
> so, what happened?
>
> initialRequest: aRequest
> super initialRequest: aRequest.
> aRequest
> at: 'var1'
> ifPresent: [:v | Transcript show: v].
>
> Regards,
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Thierry
> Thelliez
> Sent: Wednesday, September 09, 2009 8:34 AM
> To: Seaside - general discussion
> Subject: [Seaside] Legacy system and Seaside
>
> Hello,
>
> I am trying to port an older system to Seaside. The code is in
> Smalltalk and it uses explicit HTTP POST and GET variables.
>
> Is there a way in Seaside to receive a variable in the url (ie
> http://abc/xyz?var1=123) and of course extract it within the Smalltalk
> code.
>
> Searching this forum, the closest I found was the following in 2007,
> but I cannot figure out how to make this work.
>
> ---------------------------------------------
> 2007/10/16, Randal L. Schwartz <merlyn at stonehenge.com>:
>>
>> I'm replacing a badly-written (that is, not *mine*) Perl application
> with a
>> seaside application. Let's say I've installed my application at
>> /seaside/booking. How do I intercept, say,
>> /seaside/booking?legacy=app&does=this and turn that into an initial
>> hit into my app with a couple of instance vars set, so that
>> all the remaining /seaside/booking?_s=...&_c=... still work?
>
> Implement #initialRequest (don't forget to send super). WABrowser has
> an example. If you want the parameters (legacy and does) to stay
> you'll also have to implement #updateUrl:
>
> Cheers
> Philippe
> ----------------------------------------------
>
>
> Thanks,
> Thierry
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the seaside
mailing list