首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

action在request中回到的结果进行重新的处理

2012-10-08 
action在request中返回的结果进行重新的处理userActionprivate String name userActionInterceptorInterc

action在request中返回的结果进行重新的处理
userAction
       private String name;


userActionInterceptor
   
        InterceptorMethod(){
               
               step_1: 得到当前拦截的action
               step_2:  得到 action  properties [] 修改
             
                  这样应该是没有问题的!

       }


Adding a PreResultListenerAccessing the ResultConfig Objects
If you need to work with the set of ResultConfigs before the Action executes, you can use an Interceptor to process the Map returned by getResults.

public class MyInterceptor implements Interceptor {  // ...  public String intercept(ActionInvocation invocation) throws Exception {    Map resultsMap = invocation.getProxy().getConfig().getResults();      // do something with ResultConfig in map    return invocation.invoke();  }  // ...}

If you are writing against Java 5, you could use a generic when obtain the map.
Map<String, ResultConfig> resultsMap = invocation.getProxy().getConfig().getResults();


热点排行