[ajax4jsf-svn-commits] JBoss Ajax4JSF SVN: r166 - in trunk/framework/src/main: javascript/ajaxjsf and 1 other directory.

ajax4jsf-svn-commits at lists.jboss.org ajax4jsf-svn-commits at lists.jboss.org
Thu May 3 18:18:49 EDT 2007


Author: alexsmirnov
Date: 2007-05-03 18:18:48 -0400 (Thu, 03 May 2007)
New Revision: 166

Modified:
   trunk/framework/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
   trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
Partially fix RF-124 issue

Modified: trunk/framework/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
===================================================================
--- trunk/framework/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java	2007-05-03 20:15:45 UTC (rev 165)
+++ trunk/framework/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java	2007-05-03 22:18:48 UTC (rev 166)
@@ -9,7 +9,7 @@
      * 
      */
     private static final long serialVersionUID = 4060284352186710009L;
-    private boolean performed = false;
+    private volatile boolean performed = false;
 
     public void onEvent(EventObject event) {
 	performed = true;

Modified: trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js	2007-05-03 20:15:45 UTC (rev 165)
+++ trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js	2007-05-03 22:18:48 UTC (rev 166)
@@ -328,7 +328,7 @@
         	  	 	var exist = false;
         	  	 	LOG.debug("<"+tag+"> in response with src="+src);
         	  				for(var j = 0 ; j < oldscripts.length; j++){
-        	  					if(src == oldscripts[j].getAttribute(href)){
+        	  					if(this._noSessionHref(src) == this._noSessionHref(oldscripts[j].getAttribute(href))){
         	  						LOG.debug("Such element exist in document");
         	  						exist = true;
         	  						break;
@@ -349,6 +349,19 @@
 		
 	},
 	
+	_noSessionHref : function(href){
+		var sessionid = href.lastIndexOf(";jsessionid=");
+		var cref = href;;
+		if(sessionid>0){
+			cref = href.substring(0,sessionid);
+			var params = href.firstIndexOf("?");
+			if(params>sessionid){
+				cref=cref+href.substring(params);
+			}
+		}
+		return cref; 		
+	},
+	
 	_copyAttribute : function(src,dst,attr){
 		var value = src.getAttribute(attr);
 		if(value){
@@ -420,9 +433,11 @@
 		      			// Network error.
 		      		}
 		      		// Re-send request.
-					A4J.AJAX._pollers[options.pushId] = window.setTimeout(function(){
-						A4J.AJAX.SendPush( request,options );
-					},options.pushinterval);
+		      		A4J.AJAX.Push( containerId, form, options );
+		      		request=null;
+//					A4J.AJAX._pollers[options.pushId] = window.setTimeout(function(){
+//						A4J.AJAX.SendPush( request,options );
+//					},options.pushinterval);
 		      	}
 		}
 		A4J.AJAX.SendPush( request,options );




More information about the ajax4jsf-svn-commits mailing list