Hi,
I've been using T5 to develop a scientific database Web frontend, and a
requirement is that Web visitors need to be able to bookmark pages, i.e.
the parameters of what paper, dataset, etc. have to be in the URL.
Having looked at the Web documentation and the Packt book, it seemed
that PageLinks are the way to do this... and that works very well for
passing a single parameter of simple type (I tried Integer and String)
via the URL. But it's passed in an "unnamed way", i.e. PageLink'ing a
parameter of value 1234 makes a URL like .../linkedpage/1234. I need to
be able to pass
a) one of several roughly equivalent single parameters (because the name
of the parameter determines which of the bibliographic key schemes to
use when looking up the paper in the database)
b) optional extra parameters, to allow specifying only one particular
dataset or even data axis in the paper to be viewed
c) it would be good to be able to specify multiple datasets, e.g. to
construct a bookmarkable URL which displays datasets 1, 2 and 4 of a
given paper. I'd naively expect to be able to do this by passing a
Collection of the values to PageLink, but haven't even tested if this
works as I wanted to get your collective advice first!
I can do these things by hand, and in fact am doing so at the moment,
but it's by using normal URL query strings which is not really the
"Tapestry way". It also means that life is rather awkward as I have to
manually do the URL encoding and getting the query params and context
path by accessing the Request. Yuck.
In short, I'd like to employ the "Tapestry way" of having a single page
where various ways of slicing the data are accessed via a sort of "URL
API" scheme semantically similar to this:
.../view?p=1234
.../view?irn=12349876
(these first two are two ways to access all the data in the same paper)
.../view?p=1234&d=1
(view one dataset only)
.../view?p=1234&d=1&y=2
(view one axis of one axis of one dataset only)
.../view?p=1234&d=1,2,4&y=1,3
(view specific axes of specific datasets only... I wouldn't provide
links like this, but users who want specific data might construct them
themselves --- hence why I called the URL scheme an API)
So, is there a Tapestry meachnism for doing something like this? I can
do it right now, but I'd rather not have to fight the system. I would
expect Tapestry to do it a bit prettier than what I've shown, maybe
*something* like
.../view/irn/12349876/d/1,2,4
(yes, there are issues with telling what's a param name and what's a
value... I just mean this schematically) But right now I don't even know
where to start looking! Help, please!? ;)
Thanks in advance...
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org