DWR与struts spring 整合问题

本文介绍如何正确配置DWR以访问Java后端的方法getSummaryResult(),解决配置中出现的空值或错误问题。涉及Spring框架注解、依赖注入及自定义业务逻辑。
请问怎么设置DWR 才能够访问getSummaryResult()这个方法 我配置的取值一直为空 或错误..
郁闷啊
@Scope("prototype")
@Service("summaryAction")
public class SummaryCallAction extends ActionSupport {
private static final long serialVersionUID = 1L;
private static final Log logger = LogFactory.getLog(SummaryCallAction.class);

private SummaryTEntity summaryEntity;
private List<SummaryTEntity> summList = new LinkedList<SummaryTEntity>();

private int pageSize = 10 ; //页明细数
private String sortCol ; //动态排序
private String sortType; //desc asc
private String queryCol ; //动态查询 列名
private String queryValue; //查询值
private List<DicContentEntity> msgTypeList ;
private PageSplitUtil pageSplitUtil=new PageSplitUtil() ;

private String summNo = null ;
private List<DicContentEntity> callTypeList = null;
private List<DicContentEntity> custTypeList = null;
private List<DicContentEntity> channelTypeList = null;
private List<DicContentEntity> mainResultList = null;
private List<DicContentEntity> subResultList = null;
private List<DicContentEntity> summaryTypeList = null;
....
set get方法
...

@Autowired(required = false)
private IBaseService baseService = null ;
public void setBaseService(IBaseService baseService) {
this.baseService = baseService;
}

@Autowired(required = false)
private IMsgService msgService = null ;

@Autowired(required = false)
private FlexDicHelper flexDicHelper = null ;
public void setFlexDicHelper(FlexDicHelper flexDicHelper) {
this.flexDicHelper = flexDicHelper;
}

//获取当前用户信息
@Autowired(required = false)
private UserDetailsSessionService userDetailsSessionService;
public void setUserDetailsSessionService(
UserDetailsSessionService userDetailsSessionService) {
this.userDetailsSessionService = userDetailsSessionService;
}

public Map getSummaryResult(){
setDisplayDiv();

Map map = new HashMap();

for(int i=0;i<summaryTypeList.size();i++){

map.put(summaryTypeList.get(i),(summaryTypeList.get(i)).getIdValue());
}
return map;
}
/**
* 新建加载
* @return
*/
@SuppressWarnings("unchecked")
public String preSave(){
summaryEntity = new SummaryTEntity();
summNo = "";
summaryEntity.setSummaryNo(flexDicHelper.getBussinessNo("summaryCall", "", ""));
summNo = summaryEntity.getSummaryNo() ;
summaryEntity.setAgentId(userDetailsSessionService.getUserId());
summaryEntity.setSummaryTime(new Date());
setDisplayDiv();
return SUCCESS ;
}



@SuppressWarnings("unchecked")
private void setDisplayDiv(){
//访问数据库获取值
callTypeList = SysDicHelper.getInstance().getDicByDicType("callType");
custTypeList = SysDicHelper.getInstance().getDicByDicType("custType");
channelTypeList = SysDicHelper.getInstance().getDicByDicType("channelType");
mainResultList = SysDicHelper.getInstance().getDicByDicType("mainResult");
subResultList = SysDicHelper.getInstance().getDicByDicType("subResult");
summaryTypeList= SysDicHelper.getInstance().getDicByDicType("summaryType");

}









}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值