I'm first level support, Dave is platinum support :)

musachy

On 9/10/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Musachy Barroso wrote:
> > On 9/10/07, Pavel Sapozhnikov wrote:
> >> When I create a variable in Java Action class right
>
> >> before returning to a result I create a variable:
> >> String blah = "blah string";
> >> Does that variable get put automatically on [the]
> >>
> > No it doesn't add local variables to the stack.
> > You can add values to the stack by hand, but in
> > this case all you need to do is set a field in
> > your action with the value that you want, and
> > add a getX() method.
>
> To continue this a bit:
>
> What's actually happening is that the *action itself*
> is pushed onto the value stack and property references
> are evaluated against the stack.
>
> So when you say:
>
> <s:property value="foo"/>
>
> "getFoo()" is evaluated against the object on the top
> of the stack, in your example the action.
>
> ModelDriven pushes the getModel() object onto the
> stack so property references are evaluated against the
> model object (as opposed to the action itself).
>
> d.
>
>
> ---------------------------------------------------------------------
> 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