[Seaside] dynamic entry points

John McKeon p3anoman at gmail.com
Thu Oct 2 21:15:29 UTC 2008


This is something I was looking into with the FLEX question earlier this 
week. This could easily be done with parameterized url
http://www.mydomain.com/seaside/results?ts=20091000949whatever like the 
age old CGI(?) parameters.
Then use self session currentRequest fields to obtain a collection of 
the parameters in the form paramname=paravalue. Used in a WATask this 
should be a cinch. You would get the parameter ts=2008100949whatever and 
away you go.

HTH
Johnny


Yann Monclair wrote:
> 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
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>   



More information about the seaside mailing list