dwr

  • n.干重分级法
  • 网络远程通信(Direct Web Remoting)

dwrdwr

dwr

远程通信(Direct Web Remoting)

DWR(Direct Web Remoting)是一个WEB远程调用框架.利用这个框架可以让AJAX开发变得很简单.利用DWR可以在客户端利用J…

1
This is all you have to do to your back-end, so now you can start using DWR on the front end of your application. 这就是在后端需要做的所有工作,现在可以开始在应用程序的前端使用DWR了。
2
The DWR framework allows you to call methods on your Java classes directly from JavaScript code. DWR框架支持从JavaScript代码中直接调用Java类上的方法。
3
At this point, I'm ready to deploy my dwr. xml to my Web application's WEB-INF directory, where the DWR servlet will pick it up. 现在,我准备把dwr.xml部署到Web应用程序的WEB-INF目录,在那里DWRservlet会读取它。
4
DWR makes it easy to enable Ajax on the back-end of an application. DWR使在应用程序的后端启用Ajax变得十分容易。
5
For this configuration we create a dwr. xml file that we place in the WEB-INF directory of the application. 对于此配置,我们将创建dwr.xml文件,并将其放置在应用程序的WEB-INF目录中。
6
Now, take a look at a specific example to see how DWR works. 现在,让我们通过一个特定的示例来看看DWR是如何工作的。
7
Three-layer laminated soft shell upper is water and wind resistant, breathable, and treated with a DWR (durable water repellent) finish. 三层复合软壳上部是水和防风,透气,以及与DWR(耐久拒水)完成治疗。
8
This is a DWR annotation that lets DWR know this class can be automatically marshaled and sent across the wire as part of an Ajax response. 它是一个DWR注释,告知DWR此类可以自动整理,并作为Ajax响应的一部分发送。
9
While DWR has many features that I haven't covered, the article source code is a good starting point for taking DWR for a spin. DWR有许多我没有介绍的特性,文章源代码是把DWR投入使用的一个良好起点。
10
We also need to configure the DWR client side engine to use active Reverse Ajax, so we need to call dwr. engine. setActiveReverseAjax(true). 我们还需要配置DWR客户端引擎,以使用活动ReverseAjax,因此我们需要调用dwr.engine.setActiveReverseAjax(true)。
11
Finally, you need to remember that DWR Ajax calls are asynchronous and should not be expected to return in the order they were dispatched. 最后,需要记住:DWRAjax调用是异步的,所以不要期望它们会按照分派的顺序返回。
12
A few of the most promising and well-designed toolkits that we have used are: Dojo, Rico, and DWR (see Resources). 我们使用的最有前途、设计合理的一些工具包是:Dojo、Rico和DWR(请参见参考资料)。
13
You can switch freely among the Comet, polling, or even piggyback methods, simply by altering DWR's configuration. 通过更改DWR的配置,您可以自由地在Comet、轮询,甚至是piggyback方法之间进行切换。
14
You can configure DWR to call the server synchronously or asynchronously in the background. 您可以配置DWR在后台以同步或异步方式呼叫服务器。
15
In a larger application, DWR's Spring integration could be leveraged to provide DWR with Spring-created beans. 在大型应用程序中,可以使用DWR的Spring集成提供Spring生成的bean。
16
DWR is an open source, Apache licensed solution consisting of server-side Java libraries, a DWR servlet, and JavaScript libraries. DWR是一个开放源码的使用Apache许可协议的解决方案,它包含服务器端Java库、一个DWRservlet以及JavaScript库。
17
And best of all, DWR can auto-detect when it's running under Jetty and switch to using Continuations for nonblocking Comet. 最妙的是,当运行在Jetty下时,DWR能够自动检测并切换为使用Contiuations,实现非阻塞Comet。
18
The JSP file, fileupload-view. jsp, is shown in Listing 5 to illustrate how DWR helps to retrieve file upload progress from the server side. 清单5所示的JSP文件fileupload-view.jsp展示了DWR如何有助于从服务器端检索文件上载过程。
19
The starting point of a DWR application is writing your server-side object model. DWR应用程序的起点是编写服务器端对象模型。
20
DWR automatically mediates simple data types between Java and JavaScript representations. DWR自动地在Java和JavaScript表示之间调整简单数据类型。
21
In the simplest terms, DWR is an engine that exposes methods of server-side Java objects to JavaScript code. 从最简单的角度来说,DWR是一个引擎,可以把服务器端Java对象的方法公开给JavaScript代码。
22
To get around this, you might use wrapper classes to add extra DWR-specific methods to your plain-old JavaBeans. 为了克服这个问题,可以使用包装器类把额外的特定于DWR的方法添加到普通JavaBean。
23
Effectively, with DWR, you can eliminate all of the machinery of the Ajax request-response cycle from your application code. 使用DWR可以有效地从应用程序代码中把Ajax的全部请求-响应循环消除掉。
24
This article shows how you can use the Jetty servlet engine and DWR together to implement a Comet Web application simply and efficiently. 本文将展示如何结合使用Jettyservlet引擎和DWR简捷有效地实现一个CometWeb应用程序。
25
In this version of dwr. xml, I've added both a creator and a convertor for Cart. 在这个版本的dwr.xml中,我添加了Cart的creator和convertor。
26
DWR operates and maintains the State Water Project, including the California Aqueduct. 水资源部门执行并监督国家的水工程,包括加利福尼亚沟渠。
27
DWR does have its own solution to the latency issue in call batching (see the sidebar Call batching). 对于延迟,DWR在调用的批处理中有自己的解决方案(请参阅侧栏的调用批处理)。
28
Before explaining DWR in more detail, I'll introduce a simple example scenario. 在更详细地解释DWR之前,我要介绍一个简单的示例场景。
29
This string-keyed map representation can simply be converted into JavaScript by DWR's built-in convertors. 这个用字符串作为键的map表示可以由DWR的转换器转换成JavaScript。
30
You can download the complete code for our sample application, including DWR, from the Download section. 可以从下载小节下载示例应用程序的完整代码,包括DWR。