Author: alexsmirnov
Date: 2008-04-25 19:04:40 -0400 (Fri, 25 Apr 2008)
New Revision: 8204
Added:
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/StressBean.java
trunk/samples/seamIntegration/src/main/webapp/pages/stress.xhtml
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/samples/seamIntegration/pom.xml
trunk/test-applications/seleniumTest/src/main/webapp/META-INF/MANIFEST.MF
Log:
Start progress for a
http://jira.jboss.com/jira/browse/RF-3131 issue.
Fix some bugs in the current implementation.
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-04-25 22:40:40 UTC
(rev 8203)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-04-25 23:04:40 UTC
(rev 8204)
@@ -314,7 +314,7 @@
_this.doFinish();
_this = undefined;
}
- }, 50);
+ }, 0);
} else
{
if (isLast)
@@ -969,7 +969,7 @@
window.document.open = oldDocOpen;
}
LOG.debug("page content has been replaced");
- },30);
+ },0);
}
@@ -1016,14 +1016,14 @@
}
// mark status object ( if any ) for complete request ;
A4J.AJAX.status(request.containerId,options.status,false);},
- 10);
+ 0);
} else if(options.oncomplete){
LOG.debug( "Call component oncomplete function after processing updates"
);
window.setTimeout(function(){
options.oncomplete(request,request.domEvt,request.getJSON('_ajax:data'));
// mark status object ( if any ) for complete request ;
A4J.AJAX.status(request.containerId,options.status,false);},
- 10);
+ 0);
} else {
// mark status object ( if any ) for complete request ;
@@ -1033,11 +1033,12 @@
if(options.eventsQueue){
var eventsQueue = A4J.AJAX._eventsQueues[options.eventsQueue];
if( eventsQueue ) {
- A4J.AJAX._eventsQueues[options.eventsQueue]=false;
if(eventsQueue.wait){
LOG.debug("Queue not empty, execute next request in queue
"+options.eventsQueue);
A4J.AJAX.SubmiteventsQueue(eventsQueue);
- }
+ } else {
+ A4J.AJAX._eventsQueues[options.eventsQueue]=false;
+ }
}
}
};
@@ -1403,5 +1404,5 @@
}
} catch(e){ /* Mozilla in XHTML mode not have innerHTML */ };
- },50);
+ },0);
}
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2008-04-25 22:40:40 UTC (rev 8203)
+++ trunk/samples/seamIntegration/pom.xml 2008-04-25 23:04:40 UTC (rev 8204)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
@@ -98,6 +98,10 @@
<artifactId>jboss-seam-debug</artifactId>
<version>2.0.1.GA</version>
</dependency>
- </dependencies>
-</project>
-
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/StressBean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/StressBean.java
(rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/StressBean.java 2008-04-25
23:04:40 UTC (rev 8204)
@@ -0,0 +1,31 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author asmirnov
+ *
+ */
+@Name("stressBean") @Scope(ScopeType.SESSION)
+public class StressBean {
+
+ private int counter;
+
+ public int getCounter() {
+ return counter;
+ }
+
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public String next() {
+ counter++;
+ return null;
+ }
+}
Property changes on:
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/StressBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/pages/stress.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/pages/stress.xhtml
(rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/pages/stress.xhtml 2008-04-25 23:04:40
UTC (rev 8204)
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <head>
+ <title>Stress test for an AJAX requests</title>
+ <script type="text/javascript">
+ function inspect(data,time){
+ LOG.info("Data is "+data+" at time "+time);
+ }
+ </script>
+ </head>
+ <body>
+ <f:view>
+ <h1>Stress test for an AJAX requests</h1>
+ <h:form>
+ <a4j:jsFunction name="stress" action="#{stressBean.next}"
reRender="text" eventsQueue="stress"/>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Next" action="#{stressBean.next}"
reRender="text" />
+ <h:outputText id="text" value="#{stressBean.counter}"/>
+ <input id="startBtn" type="button" value="Start"
onclick="start()"/>
+ <input id="stopBtn" type="button" value="Stop"
onclick="stop()" />
+ </h:panelGrid>
+ <script type="text/javascript">
+ // <![CDATA[
+ var stressInterval;
+ function start(){
+ stressInterval=window.setInterval(stress,20);
+ };
+ function stop() {
+ window.clearInterval(stressInterval);
+ };
+ // ]]>
+ </script>
+ </h:form>
+ <a4j:log hotkey="M" />
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/pages/stress.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/test-applications/seleniumTest/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/META-INF/MANIFEST.MF 2008-04-25
22:40:40 UTC (rev 8203)
+++ trunk/test-applications/seleniumTest/src/main/webapp/META-INF/MANIFEST.MF 2008-04-25
23:04:40 UTC (rev 8204)
@@ -1,3 +1,2 @@
Manifest-Version: 1.0
-Class-Path: