I've never put a feature such as this into Tapestry core, because it seems to me that you have to, at start up, locate and load all page classes to find the @At annotation (something I'd rather not do, because a Tapestry application might have hundreds of pages, and I don't want to pay that startup cost). Is that the case? If not, in a cluster, how to you recognize the routing for a page that has not yet been loaded?
On Tue, Mar 29, 2011 at 12:38 AM, Alejandro Scandroli <alejandroscandr...@gmail.com> wrote: > From the same guys that brought you tapestry-exceptionpage, > tapestry-model, tapestry-resteasy, tapestry-security, > tynamo-federatedaccounts and other beautiful little modules, here > comes yet another beautiful little module called tapestry-routing. > > In a nutshell, tapestry-routing allows you to provide your own custom > mapping between Tapestry pages and URLs. > > Did you ever wanted to change the order of the path params in an URL? > now you can! > > Let's say you have a page: pages.projects.Members which have 2 > parameters in its activation context: (Long projectId, Long memberId) > and you want the URL for that page to look like /projects/1/members/1 > Just add the @At annotation to you page, like this: > > package ...pages.projects; > @At(" /projects/{0}/members/{1}") > public class Members { > void onActivate(Long projectId, Long memberId) > > That's it! > tapestry-routing Dispatcher will take care of recognizing incoming > requests and dispatching the proper render request > tapestry-routing PageRenderLinkTransformer will do the rest of the > work, it will transform every Link for a page render request > formatting it according to your route rule. > > We really need some feedback, so please give it a try: > http://tynamo.org/tapestry-routing+guide > > Enjoy, > Tynamo Team > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org