[Seaside] dynamic entry points
Karsten
karsten at heeg.de
Fri Oct 3 02:06:09 UTC 2008
Hi Yann,
you should have a look at how WAFileHandler is implemented, create your
own EntryPoint subclass and you're done. But make sure you implement
#default on class-side properly, so that it doesn't conflict with other
entry points.
Karsten
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
>
--
Karsten Kusche - Dipl.Inf. - karsten at heeg.de
Tel: +49 3496 21 43 29
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812
More information about the seaside
mailing list