Greetings, I'm trying to create an "engine" in tapestry which is capable of determining which page to display and can also provide parameters. I currently have a tapestry 3 application which does this via the old tapestry.engine.AbstractService.
What I've come across so far is using a Dispatcher which is contributed before the PageRenderDispatcher that resolves the page name to be displayed with the parameter values needed. My web pages will contain links ("<\a href...") that points to a given url which matches the Dispatchers name. Of course, the dispatcher checks the page name and if matches processes and determines the page name, otherwise normal dispatching occurs. My problem is when the dispatcher is dispatching a request, how can I "redirect" to a page and inject objects needed by the page? My page html: <\a href="/mywebapp/mydispatcher?someparameter='somevalue'">My Link<\/a> Java - Tapestry Dispatcher Public class MyDispatcher implements Dispatcher private ComponentSource componentSource; Public MyDispatcher(ComponentSource componentSource) { this.componentSource = componentSource; } @Override public boolean dispatch(Request request, Response response) throws IOException { String path = request.getPath(); if ("mydispatcher" == path) { String pageName = functionThatWillGetPageNameFromRequestParameters(request, response); Component page = componentSource.getPage(pageName); /****** Want to inject objects/parameters ******* And render/display this "page" component [cycle.activate(page) in T3] } return true; } } I'm not sure if this is the correct approach and am trying to port some T3 applications over to T5. Any ideas or thoughts on how to convert a T3 AbstractService would be useful. Cheers, Marcel -- View this message in context: http://old.nabble.com/T5-Page-Engine-tp26823567p26823567.html Sent from the Tapestry - User mailing list archive at Nabble.com.