I have been playing with the s:action tag and have found it impossible to
reference any property of the action in a struts2 like way. If I call an
action, ActionOne.java and return success then I am redirected to a page
called one-success.jsp which has the following:

<s:action namespace="/mynamespace" name="actionTwo" id="myActionTwo" />

 I would like to be able to reference myActionTwo and get a property called
myActionTwoProperty. I have tried many variations but if I use:

<s:property value="top"/>
<s:property value="[0].top"/>
<s:property value="[1].top"/>

Then the action at the top of the stack is always ActionOne or an instance
of com.opensymphony.xwork2.DefaultTextProvider. It is never myActionTwo.
This is true whether or not I am within the <s:action> tag.

>From this discussion here:

http://www.nabble.com/-S2--s:action-in-value-stack--td21551483.html

It says that:

Outside the action tag, "firstAction" is on top of the stack, and
"secondAction" can be referenced by name. 

But I don't understand what it means by 'referenced by name'. Does anyone
know of a Struts2 like way to reference the properties of the actionTwo?

Currently I am in the actionTwo and setting the value I need into the
request object where the JSP can then retrieve it as described in the
Struts2 wiki entry:

http://struts.apache.org/2.x/docs/action.html
-- 
View this message in context: 
http://www.nabble.com/Getting-property-with-s%3Aaction-tag-tp22499355p22499355.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to