"By name" means by the id in the "action" tag, like:

<s:action var="myaction" ..>
</s:action>

<s:property value="#myaction.someProperty" />

musachy

On Fri, Mar 13, 2009 at 11:49 AM, doahh <[email protected]> wrote:
>
> 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:
>
> &lt;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:
>
> &lt;s:property value="top"/&gt;
> &lt;s:property value="[0].top"/&gt;
> &lt;s:property value="[1].top"/&gt;
>
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to