Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

AJAX¿ò¼Ü DWR ¼òµ¥ÅäÖÃ

¼òµ¥µÄÃèÊöÏ DWR ÅäÖ㨱£ÃÜЭÒ飬Ôڴ˲»¹«¿ªÏîÄ¿Ãû³Æ£¬ÏîÄ¿Ïà¹ØÃû³ÆÈ«²¿ÓÃXXXX´úÌ棩
Ê×ÏÈ ·Ï»°²»ËµÁË ´ó¼Ò¶¼Ó¦¸ÃÀí½âDWRµÄÓô¦ ²»¶®µÄÈ¥°Ù¶È
±ØÒª°ü DWR.JAR ¹Ù·½ÏÂÔصØÖ·http://directwebremoting.org/dwr/download.html
Õâ¸öÏîÄ¿ÊÇÓÉ SSH+dwr+jquery+sitemesh+freemarker
WEB.XML
<!-- dwr -->
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
DWR.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://www.getahead.ltd.uk/dwr/dwr20.dtd">
<dwr>
<allow>
<convert converter="bean" match="com.xxxx.xxxx.entity.Payment">
<param name="include" value="id,city,ems,express,surface" />
</convert>
<create creator="spring" javascript="allDWR">
<param name="beanName" value="allDWR"/>
<include method="paymentSearch"/>
</create>
</allow >
</dwr>
ÔÚÕâÀï½âÊÍÏ ÕâÖ»ÊǸö²âÊÔDWR ËùÒÔ²¢Ã»ÓÐ×ö¹ý¶àµÄÅäÖÃ
convert ÉùÃ÷Ò»¸öBEANºÃ×ö´«Öµ´¦Àí
create ½¨Á¢Ò»¸öÓÉSPRING¹ÜÀíµÄ DWRÀà
¹«¿ª·½·¨ paymentSearch
JSÒýÓÃ allDWR
spring BEANÃû³Æ allDWR
applicationContext.xml
 <bean id="allDWR" class="com.xxxx.dwr.AllDwr" >
<property name="sessionFactory" ref="sessionFactory" />
</bean>
 ×¢ÈësessionFactory ALLDWR Õâ¸öÀàÓÃÓÚ×öÊý¾Ý¿â²Ù×÷
JSP
<mce:script type="text/javascript" src="<%=request.getContextPath()%><!--
/dwr/engine.js">
// --></mce:script>
<mce:script type="text/javascript" src="<%=


Ïà¹ØÎĵµ£º

ʹÓà AJAX À©Õ¹Æ÷×Ô¶¨Òå¿Ø¼þ

 
 Figure A MaskedEdit À©Õ¹Æ÷ÊôÐÔ
ÊôÐÔ
ĬÈÏÖµ
˵Ã÷
AcceptAMPM
False
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚָʾÊÇ·ñӦʹÓà AM/PM ·ûºÅ¡£
AcceptNegative
None
ָʾÊÇ·ñÔÊÐíʹÓøººÅ (-)¡£À´×Ô MaskedEditShowSymbol ö¾ÙµÄ¿ÉÓÃÖµ°üÀ¨£ºNone¡¢Left ºÍ Right¡£
AutoComplete
True
Ò»¸ö²¼¶ûÊôÐÔ£¬ÓÃÓÚÖ¸Ê ......

AjaxÌØЧ ¶¯Ì¬¼ÓÔصÄFAQ Ö®Èý

Ò³ÃæÖÐÏÔʾÁË3¸öÎÊÌ⣬·Ö±ð±àºÅΪ1¡¢2¡¢3¡£Ã¿¸öÎÊÌâ±íÏÖΪһ¸ö³¬Á´½Ó£¬µ¥»÷³¬Á´½Ó´¥·¢loadFAQº¯Êý¡£Ã¿¸öÎÊÌâÏÂÃæ°üº¬Ò»¸öÓÃÓÚÏÔʾ´ð°¸µÄdiv£¬idÊôÐÔÉèÖÃΪ“faqDetail+ÎÊÌâ±àºÅ”£¬Í¨¹ýstyle="display:none"ĬÈÏÉèÖÃΪÒþ²Ø¡£ÏêϸµÄº¯Êý˵Ã÷Çë²Î¿¼´úÂëÖеÄ×¢ÊÍ¡£
 
<%@ page contentType="text/plain; c ......

AjaxÌØЧ ¶¯Ì¬Ê÷ÐÎÁбí Ö®¶þ

¼¼ÊõÒªµã
ÔÚ»ù±¾Ô­ÀíµÄ½éÉÜÖУ¬Á˽⵽ͨ¹ýÔÚ¸¸½ÚµãÄÚ¶¯Ì¬´´½¨×ӽڵ㣬²¢ÀûÓÃÑùʽ±íËõ½øÍê³ÉÊ÷ÐÎÁбíµÄ»ù±¾¿ò¼Ü¡£³ýÁËÕâÒ»µãÍ⣬»¹ÓÐÏÂÃæһЩÎÊÌâÐèÒª¿¼ÂÇ¡£
1£®½«¸¸½ÚµãËùÓеÄ×Ó½Úµã·ÅÈëÒ»¸öÈÝÆ÷ÖÐ
»ù±¾Ô­ÀíÒ³ÃæÖнö°üº¬ÁË´´½¨×Ó½ÚµãµÄ¹¦ÄÜ£¬²»¿ÉÒÔ½«´´½¨ºÃµÄ½ÚµãÔÙ½øÐйرղÙ×÷¡£Êµ¼ÊÓ¦ÓÃÖв˵¥×ÜÊÇ°üº¬´ò¿ªºÍ¹Ø±ÕÁ½ÖÖ² ......

JAVA AJAX½Ì³ÌµÚËÄÕ—AJAXºÍMVCµÄ¼òµ¥½áºÏ

 ÕâÀïÎÒÃÇÔÙÀí½âÁËAJAXºó£¬¿ªÊ¼À´ÓÃʵÀý¸ÐÊÜAJAXµÄÁ¦Á¿¡£
½ñÌìÎÒ×îºóҪʵÏÖµÄЧ¹û£¬µ±Êó±ê·Åµ½Í¼Æ¬ÉÏʱ»á¸ù¾Ý£¬»á°ÑÊý¾Ý¿â¿âÀïµÄÊý¾Ý¶Á³ö£¬Í¨¹ýÏÔʾ¿òÏÔʾ³öÀ´¡£Õâ¸öÔںܶàÍøÉÏÉ̵궼ÓÐÓõ½ÕâÀïЧ¹û£¬ÎÒÃÇÕâÀïÓÃAJAXÀ´ÊµÏÖÕâ¸öЧ¹û¡£Õâ¸öʵÀýÀï½áºÏÁËMySql¡¢Servlet»¹ÓÐJs£¬ÀíÂÛÐÔºÜÉÙ£¬µ«Í¨¹ýʵ¼ùÀ´¸ÐÊÜÀíÂÛ֪ʶ¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ