论坛首页 Web前端技术论坛

DWR的一点应用

浏览 4721 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-01-31  
DWR

没有时间整理文字,贴一点代码出来看看。

dwr-bean.xml 代码
  1. <!---->xml version="1.0" encoding="UTF-8"?>  
  2. <!---->>  
  3.   
  4. <beans>  
  5.     <bean id="accessDWR" class="org.hblz.dwr.AccessDWR">  
  6.         <property name="accessService">  
  7.             <ref bean="accessService" />  
  8.         property>  
  9.         <property name="useraccessService">  
  10.             <ref bean="useraccessService" />  
  11.         property>  
  12.     bean>  
  13.   
  14.     <bean id="workstationDWR" class="org.hblz.dwr.WorkstationDWR">  
  15.         <property name="workstationService">  
  16.             <ref bean="workstationService" />  
  17.         property>  
  18.     bean>  
  19.     <bean id="bookDWR" class="org.hblz.dwr.BookDWR">  
  20.         <property name="bookService">  
  21.             <ref bean="bookService" />  
  22.         property>  
  23.     bean>  
  24.     <bean id="quotaDWR" class="org.hblz.dwr.QuotaDWR">  
  25.         <property name="quotaService">  
  26.             <ref bean="quotaService" />  
  27.         property>  
  28.     bean>  
  29.     <bean id="worktypeDWR" class="org.hblz.dwr.WorktypeDWR">  
  30.         <property name="worktypeService">  
  31.             <ref bean="worktypeService" />  
  32.         property>  
  33.     bean>  
  34.     <bean id="personDWR" class="org.hblz.dwr.PersonDWR">  
  35.         <property name="personService">  
  36.             <ref bean="personService" />  
  37.         property>  
  38.     bean>  
  39.   
  40.     <bean id="userDWR" class="org.hblz.dwr.UserDWR">  
  41.         <property name="userService">  
  42.             <ref bean="userService" />  
  43.         property>  
  44.     bean>  
  45.   
  46.     <bean id="townDWR" class="org.hblz.dwr.TownDWR">  
  47.         <property name="townService">  
  48.             <ref bean="townService" />  
  49.         property>  
  50.     bean>  
  51.     <bean id="villageDWR" class="org.hblz.dwr.VillageDWR">  
  52.         <property name="villageService">  
  53.             <ref bean="villageService" />  
  54.         property>  
  55.     bean>  
  56.     <bean id="countyDWR" class="org.hblz.dwr.CountyDWR">  
  57.         <property name="countyService">  
  58.             <ref bean="countyService" />  
  59.         property>  
  60.     bean>  
  61.     <bean id="treeDWR" class="org.hblz.dwr.TreeDWR">  
  62.         <property name="treeService">  
  63.             <ref bean="treeService" />  
  64.         property>  
  65.     bean>  
  66.   
  67.     <bean id="forestDWR" class="org.hblz.dwr.ForestDWR">  
  68.         <property name="forestService">  
  69.             <ref bean="forestService" />  
  70.         property>  
  71.     bean>  
  72.     <bean id="forestrightDWR" class="org.hblz.dwr.ForestrightDWR">  
  73.         <property name="forestrightService">  
  74.             <ref bean="forestrightService" />  
  75.         property>  
  76.     bean>  
  77.     <bean id="forestoriginDWR" class="org.hblz.dwr.ForestoriginDWR">  
  78.         <property name="forestoriginService">  
  79.             <ref bean="forestoriginService" />  
  80.         property>  
  81.     bean>  
  82.     <bean id="cutmodeDWR" class="org.hblz.dwr.CutmodeDWR">  
  83.         <property name="cutmodeService">  
  84.             <ref bean="cutmodeService" />  
  85.         property>  
  86.     bean>  
  87.     <bean id="cuttypeDWR" class="org.hblz.dwr.CuttypeDWR">  
  88.         <property name="cuttypeService">  
  89.             <ref bean="cuttypeService" />  
  90.         property>  
  91.     bean>  
  92. beans>  

 

dwr.xml 代码
  1. <!---->xml version="1.0" encoding="UTF-8"?>  
  2. <!---->>  
  3.   
  4. <dwr>  
  5.     <allow>  
  6.         <create javascript="AccessDWR" creator="spring">  
  7.             <param name="beanName" value="accessDWR">param>  
  8.             <include method="add" />  
  9.             <include method="del" />  
  10.             <include method="test" />  
  11.             <include method="update" />  
  12.             <include method="addAccess" />  
  13.         create>  
  14.   
  15.         <create javascript="WorkstationDWR" creator="spring">  
  16.             <param name="beanName" value="workstationDWR">param>  
  17.             <include method="add" />  
  18.             <include method="update" />  
  19.             <include method="test" />  
  20.             <include method="del" />  
  21.         create>  
  22.   
  23.         <create javascript="BookDWR" creator="spring">  
  24.             <param name="beanName" value="bookDWR">param>  
  25.             <include method="add" />  
  26.             <include method="update" />  
  27.             <include method="del" />  
  28.             <include method="test" />  
  29.         create>  
  30.   
  31.         <create javascript="QuotaDWR" creator="spring">  
  32.             <param name="beanName" value="quotaDWR">param>  
  33.             <include method="del" />  
  34.             <include method="test" />  
  35.         create>  
  36.   
  37.         <create javascript="WorktypeDWR" creator="spring">  
  38.             <param name="beanName" value="worktypeDWR">param>  
  39.             <include method="add" />  
  40.             <include method="update" />  
  41.             <include method="del" />  
  42.         create>  
  43.         <create javascript="PersonDWR" creator="spring">  
  44.             <param name="beanName" value="personDWR">param>  
  45.             <include method="add" />  
  46.             <include method="update" />  
  47.             <include method="del" />  
  48.         create>  
  49.         <create javascript="CountyDWR" creator="spring">  
  50.             <param name="beanName" value="countyDWR">param>  
  51.             <include method="add" />  
  52.             <include method="update" />  
  53.             <include method="del" />  
  54.         create>  
  55.   
  56.         <create javascript="TownDWR" creator="spring">  
  57.             <param name="beanName" value="townDWR">param>  
  58.             <include method="add" />  
  59.             <include method="update" />  
  60.             <include method="del" />  
  61.         create>  
  62.   
  63.         <create javascript="TreeDWR" creator="spring">  
  64.             <param name="beanName" value="treeDWR">param>  
  65.             <include method="add" />  
  66.             <include method="update" />  
  67.             <include method="del" />  
  68.         create>  
  69.   
  70.         <create javascript="VillageDWR" creator="spring">  
  71.             <param name="beanName" value="villageDWR">param>  
  72.             <include method="add" />  
  73.             <include method="update" />  
  74.             <include method="del" />  
  75.         create>  
  76.   
  77.   
  78.         <create javascript="UserDWR" creator="spring">  
  79.             <param name="beanName" value="userDWR">param>  
  80.             <include method="add" />  
  81.             <include method="update" />  
  82.             <include method="del" />  
  83.         create>  
  84.   
  85.         <create javascript="JDate" creator="new">  
  86.             <param name="class" value="java.util.Date">param>  
  87.         create>  
  88.   
  89.         <convert match="org.hblz.entity.Access" converter="bean">  
  90.         convert>  
  91.     allow>  
  92. dwr>  

 

   发表时间:2007-01-31  
上面的思路还是很清楚,希望大侠可以指出我这样设计的问题,提出好的设计方案。小弟谢谢了!
0 请登录后投票
   发表时间:2007-01-31  
没多少文字!
你的需求是什么?想要什么样的解决方案????
0 请登录后投票
   发表时间:2007-02-01  
to:daoger

没有什么具体的需求,我只是想让看看,这个项目里面的几个框架的协作是不是有问题,是不是有好的方案。
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics