[
https://issues.apache.org/struts/browse/WW-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dave Newton closed WW-2497.
---------------------------
Resolution: Not A Problem
Please ask questions on the struts-user mailing list; JIRA is specifically for
struts bugs.
What the documentation says is that actions implementing Unchainable won't have
their properties copied during chaining: this means exactly that; the
properties will not be copied from the originating action (SomeAction in your
example) to the action being chained to (OtherAction).
I'm guessing you do not have a property named "testChain" in your OtherAction
class. If you did, you would see that it is, in fact, not being copied from the
SomeAction instance.
To answer your next question: each action in the chain *is* pushed on to the
value stack. If you reference a property that is not found in the stack top
object the next object down the stack will be checked: your SomeAction
instance, which *does* have a "testChain" property.
Unchainable implies only that action properties will not be copied to the next
action in the chain, not that the action itself won't be present on the stack,
thus exposing its properties as usual.
> Chaining is copying over properties of previous action
> ------------------------------------------------------
>
> Key: WW-2497
> URL: https://issues.apache.org/struts/browse/WW-2497
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.9
> Environment: Solaris 9, Windows XP
> Reporter: Chitharanjan Mohandas
> Priority: Critical
>
> We have 2 actions which are involved in chain
> <action name="someAction" class="com.examples.SomeAction">
> <interceptor-ref name="basicStack"/>
> <result name="success" type="chain">otherAction</result>
> </action>
> <action name="otherAction" class="com.examples.OtherAction">
> <interceptor-ref name="chain"/>
> <interceptor-ref name="basicStack"/>
> <result name="success">otherAction.jsp</result>
> </action>
> com.examples.SomeAction and com.examples.OtherAction implementt Unchainable.
> We have a getTestChain() method in SomeAction, which returns "test
> Unchainable"
> When the property testChain is accessed via OGNL in otherAction.jsp, we get
> the value test Unchainable
> <s:property value="testChain"/>
> Why is this happening, the code and doculemtation clearly state that if an
> action id of type Unchainable, its property is not copied over to ValueStack.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.