Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Eric Lentz
Good call Chris! I didn't realize that. The context solution Maurizio offered now works for me. Pros/cons to both approaches. The context approach could be confusing to the uninitiated on the UI side. Pop/push could be confusing or mysterious at the interceptor level (again, for the casual Struts c

Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Chris Pratt
Remember, when you use Maurizio's way, you have to reference the values as context, not stack variables. So instead of using %{myvar} you have to use %{#myvar). (*Chris*) On Fri, Nov 30, 2012 at 10:42 AM, Eric Lentz wrote: > Maurizio, tried your way and no joy. Looks like I'll go with Łukasz'

Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Eric Lentz
Maurizio, tried your way and no joy. Looks like I'll go with Łukasz' way. Thanks everyone for your consideration and help! On Fri, Nov 30, 2012 at 1:31 PM, Lukasz Lenart wrote: > 2012/11/30 Eric Lentz : > > Inside of an interceptor, I'd like to add a value onto the the > ValueStack. > > What is

Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Lukasz Lenart
2012/11/30 Eric Lentz : > Inside of an interceptor, I'd like to add a value onto the the ValueStack. > What is the best way to do this? > > I tried this: > invocation.getStack().set("myValueStackName", theValueIwantForThisName); > > But that pushes that value to the top of the stack, pushing my act

Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Maurizio Cucchiara
Did you try to put the value in the context? invocation.getStack().getContext().put("myValueStackName", > theValueIwantForThisName); Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiar

Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Eric Lentz
Inside of an interceptor, I'd like to add a value onto the the ValueStack. What is the best way to do this? I tried this: invocation.getStack().set("myValueStackName", theValueIwantForThisName); But that pushes that value to the top of the stack, pushing my action class down which becomes problem