[Seaside] dynamic entry points

Boris Popov boris at deepcovelabs.com
Thu Oct 2 20:27:41 UTC 2008


Yann,

I think all you need to do is implement #initialRequest: on your
application component and then look at the URL and have it configure
itself appropriately without having to much with dispatchers and such.

-Boris

-- 
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Yann
Monclair
Sent: October 2, 2008 1:24 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] dynamic entry points

Hello list,

I've been scratching my head on this most of today and I'm still stuck,
so I thought I would ask for help.

I'm working on a web app to access the test results generated by our
automated test system.
The results are stored in folders named with the timestamp when the test
completed. The folder includes various files, like the time spent on
each test, the logs generated...
The folder structure would look something like this:

results
  20081002145402
    logs.tar.gz
    elapsedTimes.txt
    info.txt
  20081002153408
    logs.tar.gz
    elapsedTimes.txt
    info.txt

Currently the system we have offers a central webpage, that displays all
available result (in chronological order), and when you click on a link,
it opens a popup with a seaside page displaying the results. The seaside
page provides links to the logs and displays the various files in a
nicely formatted way.

What I would like to do is send each developer a permanent url (s)he can
use to consult the results for that test run.

the url woudl be something like this
http://mydomain.com/seaside/results/20081002145402
and that would open directly the seaside view for that test run.

So I started of by subclassing WADispatcher, to override #entryPointAt:.
I was thinking I could intercept the string '20081002145402' and that
way know which test run to return.
I can register my dispatcher at /seaside/results and if I check
WADispatcher default entryPoints it is there.

However, when I try to access this url, I get an error
/seaside/results/20081002145402 doesn't exist (I don't remember the
exact Seaside wording).

My idea was that the request would go like this:

/seaside/results/20081002145402
seaside -> this goes to WADispatcher default
results -> this goes to ResultsDispatcher default
20081002145402 -> ResultsDispatcher creates on the fly the page for that
test run and returns that.

I'm sure I'm missing something fairly basic to manage to get my
dispatcher in the loop properly. Or I just misunderstood how this part
works.

Any help is appreciated.

I'm currently using Seaside 2.6 in VisualWorks. I don't plan on
upgrading in the next weeks, but should upgrade over the next few months
up to 2.8 (via 2.7).

Cheers,

Yann




More information about the seaside mailing list