scopedModelDriven and ScopedModelDrivenInterceptor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

scopedModelDriven and ScopedModelDrivenInterceptor

albert kao-2
I am a Struts2 beginner.
I saw the scopedModelDriven and ScopedModelDrivenInterceptor mentioned in
chapter 14 "Migration from Struts Classic" in the "Struts 2 in  Action"
book by "Donald Brown, ...".

The Struts2 documentation said:

"public interface ScopedModelDriven<T>
extends ModelDriven
<https://struts.apache.org/maven/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html><T>

Adds the ability to set a model, probably retrieved from a given state."

Are scopedModelDriven and ScopedModelDrivenInterceptor used for mainly
for "Migration
from Struts Classic"?
If not, please provide more explanation and source code examples.
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: scopedModelDriven and ScopedModelDrivenInterceptor

Yasser Zamani


On 11/6/2017 4:12 AM, albert kao wrote:
> please provide more explanation and source code examples.

I think it is like ModelDriven but in ModelDriven you can have the model
only in that action but in ScopedModelDriven you can have the model
shared between actions in larger scopes `request` (default) or
`session`. For example [1].

[1]
https://www.experts-exchange.com/questions/26478728/Struts2-scopedModelDriven.html

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