Re: [s2] Finding a URL of an Action within execute()

2007-01-31 Thread Eric Rank
Never mind, I found it. org.apache.struts2.views.util.UrlHelper E. One last question, where does the UrlHelper class come from? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [s2] Finding a URL of an Action within execute()

2007-01-31 Thread Eric Rank
Mmmm, Injection. Magic indeed! That's the coolest thing I've seen all week. That does exactly what I want it to. One last question, where does the UrlHelper class come from? Eric Rank On Jan 30, 2007, at 9:36 PM, Tom Schneider wrote: Take a look at ServletActionRedirectResult, something l

Re: [s2] Finding a URL of an Action within execute()

2007-01-30 Thread Tom Schneider
Take a look at ServletActionRedirectResult, something like this might do it: @Inject public void setActionMapper(ActionMapper mapper) { this.actionMapper = mapper; } to inject the action mapper. I've coined the phrase 'magic injector' to describe this. Then String uri = act

Re: [s2] Finding a URL of an Action within execute()

2007-01-30 Thread Eric Rank
Thanks Bob, I wouldn't be too afraid of doing something like that, but I need the URL for a different Action, named in the mapping -- that is, I don't need the URL for the Action that's executing. Eric Rank On Jan 30, 2007, at 6:07 PM, bob wrote: This is surely not the best way . . . b

RE: [s2] Finding a URL of an Action within execute()

2007-01-30 Thread bob
This is surely not the best way . . . but you can implement one of the Aware interfaces that gives you a reference to the ServletRequest and get the URL info from that, from there I assume you could probably build the action specific url. But I'm also sure there must be access to the struts ma