AJAX Validation

来源:互联网 发布:java xml与json互转 编辑:程序博客网 时间:2024/06/14 04:43

2.0.x releases of Struts 2 use DWR for AJAX validation. This documentation refers to version 2.1.

Struts provides client side validation

(using JavaScript) for a few validators. Using AJAX validation, all validators available to the application on the server side can be used without forcing the page to reload, just to show validation errors. AJAX validation has a server side, which is in included the Struts core jar (an interceptor and some utility JavaScript files), and a client side, which is included in the Dojo plugin.

To use AJAX validation out of the box, install the Dojo plugin. An example is provided on how to use AJAX validation with Prototype, in this case the Dojo plugin is not required.


****  网址:http://struts.apache.org/docs/ajax-validation.html  ****

0 0