• DWR在Spring中应用


    这里以传递一个对象为例,来说明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>
    
  • 相关阅读:
    (转)django上传文件
    django中的认证与登录
    django中的转义
    django中的request对象详解
    dotnetspider
    区块链试验
    管理员权限
    axure跨inframe传递参数
    python selenium chrome 测试
    python chrome selenium
  • 原文地址:https://www.cnblogs.com/lvxiaowei/p/4228425.html
Copyright © 2020-2023  润新知