Author: musachy
Date: Fri Jun  1 14:05:52 2007
New Revision: 543617

URL: http://svn.apache.org/viewvc?view=rev&rev=543617
Log:
Update example with right topic parameters

Modified:
    struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/bind/index.jsp

Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/bind/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/bind/index.jsp?view=diff&rev=543617&r1=543616&r2=543617
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/bind/index.jsp 
(original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/bind/index.jsp Fri 
Jun  1 14:05:52 2007
@@ -9,12 +9,18 @@
 </head>
 
 <script type="text/javascript">
-    dojo.event.topic.subscribe("/before", function(data, type, e){
-      alert("Before request");
-    });
-    dojo.event.topic.subscribe("/after", function(data, type, e){
-      alert("After request");
-    });
+   dojo.event.topic.subscribe("/before", function(event, widget){
+      alert('inside a topic event. before request');
+      //event: set event.cancel = true, to cancel request
+      //widget: widget that published the topic
+   });
+   
+   dojo.event.topic.subscribe("/after", function(data, request, widget){
+      alert('inside a topic event. after request');
+      //data : text returned from request
+      //request: XMLHttpRequest object
+      //widget: widget that published the topic
+   });
 </script>
 
 <body>


Reply via email to