accepting a "legacy" form for an initial state

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

accepting a "legacy" form for an initial state

Randal L. Schwartz

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?

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: accepting a "legacy" form for an initial state

Philippe Marschall
2007/10/16, Randal L. Schwartz <[hidden email]>:
>
> 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

> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside