IMHO this does not have to lead to any worse code than what you had before - remember, we are just changing redirect-action configurations in the action-mappings.xml. The whole point, in fact, with the action-mappings.xml is to manage such dependencies - it's the glue, if you like. Sure, I might not see in what ways others could create a mess with this, but even then, is it really a problem Struts2 should solve? I am also not sure what this would do to the Struts2 code, maybe there are some design problems?
Well, I also have a suspicion, by reading through other posts, that people might have been looking for this, but have failed to describe the real problem. I have also seen complaints (maybe old ones?) about OGNL creating worse performance, compared to other frameworks, but I think if you look at server response times the redirects can be worse, at least from the performance tests I have seen. On the other hand, maybe the application I, and the rest of the team I am working with, is creating a much more complex application than most people normally do. Could very well be that Struts2 is not even the right tool for the job. ;-) I will have a look at the code, if it is a simple thing to add what I have been talking about to Struts2 I will probably try to contribute. / Fredrik Lindberg (2012-09-29). On Sat, Sep 29, 2012 at 12:40 AM, Dave Newton <[email protected]> wrote: > The issue isn't at all related to parameters, it's related to spaghetti > code and the brittle nature of inter-action dependencies. > > I suspect it hasn't been addressed because nobody sees it as a particularly > important issue. If you feel otherwise, we have no problem taking a look at > a patch proposal. > > Dave > > (pardon brevity, typos, and top-quoting; on cell) > On Sep 28, 2012 12:21 PM, "Fredrik Lindberg" <[email protected]> wrote: > >> Ok, let's call it "chaining done better", why is there no such thing >> in Struts2? If you read what it says about chaining it is really not >> recommended in the Struts2 documentation, and I agree, because >> parameters are not handled on in a nice way, but why not fix that? >> What is the issue? >> >> True, reloads can be a bit tricky, but that this is in IMHO not an >> issue Struts2 needs to solve. You might, in fact, have the same >> problem if you reload in other cases as well. You could e.g. have >> created some kind of add action and running it again, via a reload, >> might add something twice. >> >> / Fredrik Lindberg (2012-09-28). >> >> On Fri, Sep 28, 2012 at 3:58 PM, Dave Newton <[email protected]> >> wrote: >> > On Fri, Sep 28, 2012 at 1:38 AM, Fredrik Lindberg wrote: >> > >> >> Don't you agree that you sometimes need to use the redirect-action? In >> >> that case why could Struts2 not just provide a different result-type >> >> that skips the browser redirect and just returns the result of the >> >> following action right away? >> > >> > >> > That's called action chaining. Your issue with that regards parameters. >> The >> > same parameter problem would exist if you were forwarding to an action. >> > >> > >> >> I believe I have seen this possibility in >> >> other frameworks and the only bad thing I have heard from others here, >> >> so far, is that the URL will not show correctly in the browser. >> >> >> > >> > And the re-submit problem. >> > >> > Dave >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
