I'd interpret your example as a Catalog page with an activation
consisting of three strings (catalog, category, product).
So, a URL might be "/catalog/sears/games/settlers-of-catan" and the
Catalog page would recieve an activation event to inform it of the
contents of the path: i.e.
public class Catalog {
...
void onActivate(String catalog, String category, String product)
{
...
}
}
Tapestry 5 is pretty strict on its name: "catalog" in a URL is a
logical page name. This will be mapped to a particular class:
com.wonderfulhost.my.app.pages.Catalog perhaps. The case of the word
"catalog" doesn't matter. The Catalog page will have a template named
"Catalog.html" and that goes in one of only two places: on the class
path with Catalog.class, or in WEB-INF (the latter case only applies
to application pages, not pages from a library).
In terms of your ease-of-use case ... that's an interesting problem.
It's a kind of mapping. Certainly T5 doesn't have a construct to
handle that right now; I'll try and keep it in mind as something not
to prevent. One solution may involve a server-side or client-side
redirect, but that's a bit ugly.
On 2/22/07, Jérôme BERNARD <[EMAIL PROTECTED]> wrote:
Hi,
Will Tap5 support of kind of URL routing support?
What I mean is that I'd like to route/match URLs such as
http://my.wonderfulhost.com/catalog/${catalog}/${category}/${product}
to a ProductPage having the variable ${catalog}, ${category, and
${product} automatically filled in.
Or should we do it like Tapestry 4?
Next related questions is I18N or URI.
Will there be a way to have this kind of use-case:
- a ProductPage page class,
- a Product.html template (english version),
- a Product_fr.html template (french version as you guess :))
- the URL http://my.wonderfulhost.com/product.html delivering the
english version,
- the URL http://my.wonderfulhost.com/produit.html delivering the
french version.
I hope my explanation is not too much confusing :-p
Thanks,
Jérôme.
--
Jérôme BERNARD,
Kalixia, SARL.
http://weblog.kalixia.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]