`
yaozuodaoforfly
  • 浏览: 119040 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

ScopedModelDrivenInterceptor

 
阅读更多

An interceptor that enables scoped model-driven actions.

This interceptor only activates on actions that implement the ScopedModelDriven interface. If detected, it will retrieve the model class from the configured scope, then provide it to the Action.

Interceptor parameters:

  • className - The model class name. Defaults to the class name of the object returned by the getModel() method.
  • name - The key to use when storing or retrieving the instance in a scope. Defaults to the model class name.
  • scope - The scope to store and retrieve the model. Defaults to 'request' but can also be 'session'.

Extending the interceptor:

There are no known extension points for this interceptor.

Example code:

 
 
 <-- Basic usage -->
 <interceptor name="scoped-model-driven" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor" />
 
 <-- Using all available parameters -->
 <interceptor name="gangsterForm" class="com.opensymphony.interceptor.ScopedModelDrivenInterceptor">
      <param name="scope">session</param>
      <param name="name">gangsterForm</param>
      <param name="className">com.opensymphony.example.GangsterForm</param>
  </interceptor>
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics