You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dimitrios Christodoulakis <di...@gmail.com> on 2009/07/12 14:57:37 UTC

reachable valuestack properties exposed by previous actions?

Hello,

This is a quick question that I am having, more on the theory side.
So, what happens to properties exposed on the valuestack by some
action which was called in the past, meaning the application workflow
has progressed and other actions were called after that. Is that
property somehow still reachable on the stack (by other actions and
action results), or is it popped from the stack as soon as another
action is called?

For example, I need to access a property exposed a few actions back,
and was wondering what is the appropriate way to do that. Can I
somehow propagate (or carry over) this property through actions and
results (would like to avoid attaching it to url params) until I am
ready to use it, or can it just sit there and be retrieved by digging
deep into the valuestack? Is there a handy example somewhere?

At the same time I am consulting my struts 2 book to grasp the idea,
but any hint to help me understand this better would be greatly
appreciated.

Regards

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dimitrios Christodoulakis <di...@gmail.com>.
Appreciate the warning. Thanks, I'll try to avoid that then. Alright,
I'll take the chance to re-state my problem in a new thread.

On Sun, Jul 12, 2009 at 11:15 AM, Dave Newton<ne...@yahoo.com> wrote:
> Dimitrios Christodoulakis wrote:
>>
>> Thanks for the warning. Actually, I thought it might help me solve
>> another issue I am facing: deleting objects from a collection. I tried
>> to explain in my previous thread but, I think I might have not
>> described the problem correctly.
>
> To paraphrase an old saying:
>
> I had a problem where I needed to delete objects from a collection. I
> decided to use action chaining. Then I had two problems.
>
> In other words, if action chaining is the solution, then chances are the
> problem isn't being stated very well--there is almost *always* a better,
> cleaner way to do it.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dave Newton <ne...@yahoo.com>.
Dimitrios Christodoulakis wrote:
> Thanks for the warning. Actually, I thought it might help me solve
> another issue I am facing: deleting objects from a collection. I tried
> to explain in my previous thread but, I think I might have not
> described the problem correctly.

To paraphrase an old saying:

I had a problem where I needed to delete objects from a collection. I 
decided to use action chaining. Then I had two problems.

In other words, if action chaining is the solution, then chances are the 
problem isn't being stated very well--there is almost *always* a better, 
cleaner way to do it.

Dave

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dimitrios Christodoulakis <di...@gmail.com>.
Thanks for the warning. Actually, I thought it might help me solve
another issue I am facing: deleting objects from a collection. I tried
to explain in my previous thread but, I think I might have not
described the problem correctly.

On Sun, Jul 12, 2009 at 10:14 AM, Dave Newton<ne...@yahoo.com> wrote:
> Dimitrios Christodoulakis wrote:
>>
>> Thanks, I will look into action chaining and see if it can help me in
>> this situation.
>
> Oh, please don't; it just leads to maintenance nightmares.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dave Newton <ne...@yahoo.com>.
Dimitrios Christodoulakis wrote:
> Thanks, I will look into action chaining and see if it can help me in
> this situation.

Oh, please don't; it just leads to maintenance nightmares.

Dave

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dimitrios Christodoulakis <di...@gmail.com>.
Thanks, I will look into action chaining and see if it can help me in
this situation.

On Sun, Jul 12, 2009 at 8:22 AM, Dave Newton<ne...@yahoo.com> wrote:
> Dimitrios Christodoulakis wrote:
>>
>> This is a quick question that I am having, more on the theory side.
>> So, what happens to properties exposed on the valuestack by some
>> action which was called in the past, meaning the application workflow
>> has progressed and other actions were called after that. Is that
>> property somehow still reachable on the stack (by other actions and
>> action results), or is it popped from the stack as soon as another
>> action is called?
>
> If you're not using action chaining the stack is popped between requests.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: reachable valuestack properties exposed by previous actions?

Posted by Dave Newton <ne...@yahoo.com>.
Dimitrios Christodoulakis wrote:
> This is a quick question that I am having, more on the theory side.
> So, what happens to properties exposed on the valuestack by some
> action which was called in the past, meaning the application workflow
> has progressed and other actions were called after that. Is that
> property somehow still reachable on the stack (by other actions and
> action results), or is it popped from the stack as soon as another
> action is called?

If you're not using action chaining the stack is popped between requests.

Dave

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