You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Volker Krebs <vo...@abas.de> on 2011/12/08 11:03:00 UTC
Struts2 ScopeInterceptor scope.type end problem
Hello,
I've made an small workflow using the ScopeInterceptor.
All works fine, but I have one small problem, where I want to discuss a
solution.
My last action is defined as scope.type=end
<action name="showConfirmation" class="MyAction">
<interceptor-ref name="myScopeStack">
<param name="scope.type">end</param>
</interceptor-ref>
<result name="input">/confirm.jsp</result>
</action>
on the confirm.jsp I have no access to the objects which the
ScopeInterceptor was managing, because for scope.type=end actions
everything is cleared.
Any best practice for this (common) problem ?
Make an extra finish action that copies the scope objects to the
request ?
Any suggestions ?
Thanks
Volker
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 ScopeInterceptor scope.type end problem
Posted by Volker Krebs <vo...@abas.de>.
Hello,
yes the problem is that all scope objects managed by the scope
Interceptor will be cleared if the scope.type is "end".
I was looking for a way to copy it to the request, so that I could
display a confirmation/summary on the last page involved in my scope.
But the ScopyInterceptor does not set the scope objects to my Action if
the scope.type is "end".
Take a look at the beforeResult implementation in ScopeInterceptor.
I have no chance to access the scope Objects in an "end"-Action.
And ScopeInterceptor is not applicable for extension, since it has to
many private Fields/Methods.
Thanks,
Volker
On Do, 2011-12-08 at 21:42 -0800, mohan rao wrote:
> Once you action execution is done all the valueStack objects will be cleared.
> This is might be causing the problem. And can you please elaborate your
> requirements.
>
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Struts2-ScopeInterceptor-scope-type-end-problem-tp5058274p5060788.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 ScopeInterceptor scope.type end problem
Posted by mohan rao <mo...@gmail.com>.
Once you action execution is done all the valueStack objects will be cleared.
This is might be causing the problem. And can you please elaborate your
requirements.
--
View this message in context: http://struts.1045723.n5.nabble.com/Struts2-ScopeInterceptor-scope-type-end-problem-tp5058274p5060788.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org