Stripes

Existing ActionBeanContext retains old event name on forward

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: Release 1.5.1
  • Fix Version/s: Release 1.5.2, Release 1.6
  • Component/s: None
  • Labels:
    None

Description

When a forward is done to an ActionBean class that has already been instantiated, setContext(..) is not necessarily called for the new ActionBeanContext, by design. In cases where the new context is not passed to the ActionBean, the context retains old information, such as event name, that can lead to some baffling issues. The relevant information should be passed to the existing context in such cases.

Activity

Hide
Ben Gunter added a comment - 25/Mar/09 11:06 PM

This is related to STS-565. The root of the problem is that we often end up with the ExecutionContext and ActionBean using two different ActionBeanContext instances in the same request. To fix that, DispatcherHelper, after resolving the ActionBean for the request, will then check to see if the bean's context instance is different from the one in the ExecutionContext. If so, then it will take the bean's context, copy the event name from the ExecutionContext to it (normally null) and then pass it to ExecutionContext.setActionBeanContext().

Show
Ben Gunter added a comment - 25/Mar/09 11:06 PM This is related to STS-565. The root of the problem is that we often end up with the ExecutionContext and ActionBean using two different ActionBeanContext instances in the same request. To fix that, DispatcherHelper, after resolving the ActionBean for the request, will then check to see if the bean's context instance is different from the one in the ExecutionContext. If so, then it will take the bean's context, copy the event name from the ExecutionContext to it (normally null) and then pass it to ExecutionContext.setActionBeanContext().

People

Vote (0)
Watch (0)

Dates

  • Created:
    25/Mar/09 9:30 PM
    Updated:
    04/Jan/11 1:56 PM
    Resolved:
    25/Mar/09 11:06 PM