[Seaside] User input and component state update via GET

Michael Forster mike at sharedlogic.ca
Mon Jun 29 16:50:00 UTC 2009


Hi,

I'm using squeak-web 3.10.2-7179 image, with seaside 2.8a-1r.572.

I'm writing an application that must be accessed via handheld
scanners.  The scanners run an extended version of Internet Explorer
that provides an HTML meta tag to capture a scanned barcode and submit
it via a GET request.  I've prototyped this using a raw Commanche form
renderer and handler, but there is a great deal more interactivity
required, and I would really like to take advantage of Seaside.

I can generate the required meta tag, as shown below:

    updateRoot: anHtmlRoot
        | meta |
        super updateRoot: anHtmlRoot.
        meta := anHtmlRoot meta.
        meta responseHeaderName: 'scannernavigate'.
        meta content: anHtmlRoot context actionUrl asString,
'&barcodeno=%s&Source=%s&Type=%s&Time=%s&Length=%s'

However, because I retain the _s and _k parameters, I can't use
#initialRequest to parse the 'barcodeno' parameter from the GET
request.  This isn't quite the same as the problems that Ramon Leon
addressed in his 'Clean URLs' and 'Stateless Sitemap' articles.
Essentially, I need a regular session/continuation-based Seaside app,
with a couple of components that capture input via GET, but which
still allow a call/answer approach.

After hunting around the list archives and the Seaside sources, I'm
starting to think that I need to recreate the notion of separate forms
and handlers atop Seaside, using URL redirects to glue them together.
Am I barking up the wrong tree here?

Thanks in advance for any advice!

Mike

-- 
Michael J. Forster <mike at sharedlogic.ca>


More information about the seaside mailing list