[ http://mc4j.org/jira/browse/STS-378?page=comments#action_10706 ] Ben Gunter commented on STS-378: --------------------------------
And as I should have expected, this turns out to be hard than it looks. I wanted to have OnwardResolution set a known request attribute to the name of the desired event. Then I wanted to change AnnotatedClassActionResolver to check that attribute before checking anything else. Unfortunately, OnwardResolution never touches a request object so that won't work. Suggestions welcome. > incorrect event handler invoked with ForwardResolution(Class<? extends > ActionBean>, String) > ------------------------------------------------------------------------------------------- > > Key: STS-378 > URL: http://mc4j.org/jira/browse/STS-378 > Project: Stripes > Issue Type: Bug > Components: ActionBean Dispatching > Affects Versions: Release 1.4.3 > Reporter: Ben Gunter > Assigned To: Ben Gunter > Fix For: Release 1.5 > > Attachments: TestAction.java > > > When a request is received with an explicit event name, like so > /my/action?foo= > and that request is forwarded to another (or the same) ActionBean that has an > event with the same name but a different event is intended to fire, like so > return new ForwardResolution(getClass(), "bar") > the original event often will fire on the forwarded request instead of the > intended event because the original event name is still present as a request > parameter. This leads to stack overflow or other such problems. > The event that fires on the forwarded request is determined by the order in > which the event handler methods are stored in the event handler cache in > AnnotatedClassActionResolver. The first one whose name is found as a request > parameter is determined to be the intended event. > One possible solution to this problem is for ForwardResolution(Class<? > extends ActionBean>, String) to add the event name as both a request > parameter and as a request attribute. > AnnotatedClassActionResolver.getEventName() would check for event as a > request attribute first and then examine the request parameters after that. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://mc4j.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Stripes-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-development
