History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-617
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Patrick Lightbody
Reporter: Frank Febbraro
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Stale Action Invocation left in Stack Context

Created: 16/Aug/04 10:10 AM   Updated: 04/Dec/06 06:49 PM
Component/s: Actions, Views, Value Stack
Affects Version/s: 2.1
Fix Version/s: 2.1.7


 Description  « Hide
When the ww:action tag is used within a view page, the ActionInvocation is set on OgnlValueStack.getContext(), however after this tag is finished it is not removed (with the original replaced) so any subsequent velocity view accessing the $action keyword (as setup by VelocityManger) will contain a reference to the ww:action invocation and not the original action invocation.

 All   Comments   Change History      Sort Order:
Patrick Lightbody - [09/Sep/04 06:52 PM ]
Frank, I don't know what you are referring to :(

Frank Febbraro - [10/Sep/04 12:42 PM ]
I saw this bug specifically when I did the following.

1) Executed an Action (ViewAction) that sent me to a JSP.
2) In the JSP I used a <ww:action> (callign CategoryAction) to get a list of something to populate a dropdown.
3) Somewhere *after* that <ww:action> tag I tried to use an error.vm via <ww:component> to display some errors from the original Action

The action in the following error.vm wound up being the 2nd action, CategoryAction, not the originally requested action, ViewAction.

error.vm
---------------------------
#if( $action.hasActionErrors() )
    #foreach( $error in $action.actionErrors )
<div class="errorMessage">$!webwork.htmlEncode($error)</div>
    #end
#end

Frank Febbraro - [10/Sep/04 12:49 PM ]
I should also add that the <ww:action/> tag in the JSP is closed, it has no body. I would except $action to be CategoryAction while within the body, but not after the tag has ended.

Patrick Lightbody - [15/Oct/04 01:17 AM ]
OK, I understand the bug and I think I know of a fix for it, but it will need to wait until after this 2.1.2 release which is badly needed.

Jason Carreira - [28/Nov/04 08:43 PM ]
Please check this with the latest CVS. I think the change I made to create a new ValueStack copy when creating a chained ActionContext should solve any issues like this.

Patrick Lightbody - [12/Dec/04 01:53 PM ]
I have verified this is fixed.