码迷,mamicode.com
首页 > 编程语言 > 详细

DWR在Spring中应用

时间:2015-01-16 14:23:25      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:

这里以传递一个对象为例,来说明dwr在Spring中是怎么配置的。

JSP页面:
<script src=‘dwr/interface/instructionOuterService.js‘></script>
<script src=‘dwr/engine.js‘></script>
<script src=‘dwr/util.js‘></script>
 var instructionOuter =
 {
     id: 1,        
     name: ‘myName‘
  };

//设置同步
DWREngine.setAsync(false);
instructionOuterService.checkSameIns(instructionOuter,function(date){
	return ;
});

Dwr.xml文件:
<create creator="spring" javascript="instructionOuterService">
	<param name="beanName" value="instructionOuterService" />
		<include method="checkSameInsById" />
</create>
<convert converter="bean" match="com.nstc.wst.model.InstructionOuter">
<param name="include" value="id,name" />
</convert>


Spring配置:
<bean id="instructionOuterService" class="com.nstc.wst.server.InstractionCheckService" autowire="byName">
<property name="paymentHelper"><ref bean="paymentHelper"/></property>
</bean>

 

DWR在Spring中应用

标签:

原文地址:http://www.cnblogs.com/lvxiaowei/p/4228425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!