Well, I don't hate that idea. It seems pretty close to what I'm already doing.
Couple of questions about it. Would I get the response from RequestGlobals? If so, I guess I would have to inject that into my controller also, right? What are the implications here, regarding persistence from one page to the next? Since I'm just generating a link for the next page, I wouldn't be able to set values on the page before doing the redirect. On 7/21/11 2:15 PM, "Robert Zeigler" <robert.zeig...@roxanemy.com> wrote: >Hm, well, on an event, tapestry is definitely looking for a result from >the event; it normally falls to the ComponentEventResultProcessor service >to handle that return value and determine what to send the client, with >the default action being (for void event handlers) to re-render the page. > >Just thinking "out loud"... what if you inject PageRenderLinkSource >(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ >PageRenderLinkSource.html) into the Conroller? Then you could still use >the controller.setView and generate a page render link inside your >controller, If you also inject the Response service >(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ >Response.html) into your controller, you could do >response.sendRedirect(theLink). Not sure if that gets you the exact >behavior you want, but it might be a place to start. > >Robert > >On Jul 21, 2011, at 7/211:58 PM , Norman, Jason wrote: > >> Hello, >> >> I'm working on porting a fairly large Tap3 application to Tap5. I >>understand there is a large difference, and many of the concepts don't >>translate. But I am hoping for a little nudge in the right direction, >>since I've spent a few days searching the web for ideas. >> >> I have a lot of existing code that I need to hang on to, and we have >>good layer separation so that makes it easier to do. But I am having >>trouble figuring out how to tie our view into the controller layer. >> >> Using tutorials and examples, I think I have a good understanding of >>how to navigate among pages using T5, but what I can't figure out is how >>to let a controller navigate to a page. >> >> In T3, I would put a controller in the page class, then hand the page >>class itself to the controller (something like controller.setView(this) >>in the page class), then the controller does it's work and at the end it >>gets the RequestCycle from the page, and uses that to navigate to the >>appropriate next page, using the activate method on the RequestCycle. In >>all of the T5 examples I find, all page navigation is done from within >>the page class itself. Since T5 doesn't have the RequestCycle, I'm not >>sure exactly where to look to find that kind of functionality. >> >> It occurs to me that I could do this by returning page classes from the >>controller back to the original page, which could then return them from >>the action methods, but that would be a little bit more refactoring in >>my controller than I was hoping to do. I was hoping I could leave my >>controllers more or less alone and rewrite the app at the page level, >>since the goal is to have exactly the same behaviors in the T5 version. >> >> Any ideas or suggestions or advice? >> >> Thanks. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org