JBoss Rich Faces SVN: r11653 - in trunk/test-applications/seleniumTest/richfaces: src/test/java/org/richfaces and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-08 13:18:38 -0500 (Mon, 08 Dec 2008)
New Revision: 11653
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/
trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml
Modified:
trunk/test-applications/seleniumTest/richfaces/pom.xml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
RF-5197
Modified: trunk/test-applications/seleniumTest/richfaces/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-08 17:36:50 UTC (rev 11652)
+++ trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-08 18:18:38 UTC (rev 11653)
@@ -15,76 +15,121 @@
<version>3.3.0-SNAPSHOT</version>
<build>
<finalName>richfaces</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <!-- Skip the normal tests, we'll run them in the integration-test phase -->
- <skip>true</skip>
- <suiteXmlFiles>
- <!--suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_all_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_all_tidy.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_all_neko.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
- </suiteXmlFile>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng_default_default_neko.xml
- </suiteXmlFile-->
- <suiteXmlFile>
- src/test/testng/win/local_testng.xml
- </suiteXmlFile>
- </suiteXmlFiles>
- <properties>
- <property>
- <name>listener</name>
- <value>org.richfaces.TestAnnotationTransformer</value>
- </property>
- </properties>
- </configuration>
- <executions>
- <execution>
- <phase>integration-test</phase>
- <goals>
- <!--goal>test</goal-->
- </goals>
+ </build>
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
- <skip>false</skip>
+ <!-- Skip the normal tests, we'll run them in the integration-test phase -->
+ <skip>true</skip>
+ <suiteXmlFiles>
+ <!--suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_tidy.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_neko.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_neko.xml
+ </suiteXmlFile-->
+ <suiteXmlFile>
+ src/test/testng/win/local_testng.xml
+ </suiteXmlFile>
+ </suiteXmlFiles>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.richfaces.TestAnnotationTransformer</value>
+ </property>
+ </properties>
</configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <!--goal>test</goal-->
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>hudson</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <!-- Skip the normal tests, we'll run them in the integration-test phase -->
+ <skip>true</skip>
+ <suiteXmlFiles>
+ <suiteXmlFile>
+ src/test/testng/hudson/testng.xml
+ </suiteXmlFile>
+ </suiteXmlFiles>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.richfaces.TestAnnotationTransformer</value>
+ </property>
+ </properties>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<repositories>
<repository>
<releases>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-08 17:36:50 UTC (rev 11652)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-08 18:18:38 UTC (rev 11653)
@@ -141,38 +141,12 @@
@BeforeClass
@Parameters({"browser", "filterPrefix"})
public void startSelenium(String browser, String filterPrefix) {
- if ("*firefox".equals(browser)) {
- File[] libs = {new File("/usr/lib"), new File("/usr/lib64")};
- for (int i = 0; i < libs.length && "*firefox".equals(browser); i++) {
- File lib = libs[i];
- if (lib.isDirectory()) {
- System.out.println("---->lib#" + i + ": " + lib.getPath());
- File[] firefoxDirs = lib.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname != null&& pathname.getName().startsWith("firefox")
- && pathname.isDirectory();
- }
- });
- for (int j = firefoxDirs.length - 1; j >= 0 && "*firefox".equals(browser); j--) {
- System.out.println("------>firefoxDir#" + j + ": " + firefoxDirs[j].getPath());
- File[] firefoxes = firefoxDirs[j].listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- boolean result = false;
- if (pathname != null && pathname.isFile()) {
- String name = pathname.getName();
- result = "firefox".equals(name) || "firefox-bin".equals(name);
- }
- return result;
- }
- });
- for (int k = firefoxes.length - 1; k >= 0 && "*firefox".equals(browser); k--) {
- System.out.println("-------->firefoxes#" + k + ": " + firefoxes[k].getPath());
- browser += " " + firefoxes[k].getPath();
- }
- }
- }
- }
- }
+ if ("*firefox".equals(browser)) {
+ String firefox = findFirefox();
+ if (firefox != null) {
+ browser = findFirefox();
+ }
+ }
synchronized (MUTEX) {
this.filterPrefix = filterPrefix;
selenium = createSeleniumClient(protocol + "://" + host + ":" + port + "/", browser);
@@ -181,6 +155,41 @@
selenium.allowNativeXpath("false");
}
}
+
+ private String findFirefox() {
+ String browser = null;
+ File[] libs = {new File("/usr/lib"), new File("/usr/lib64")};
+ for (int i = 0; browser == null && i < libs.length; i++) {
+ File lib = libs[i];
+ if (lib.isDirectory()) {
+ System.out.println("---->lib#" + i + ": " + lib.getPath());
+ File[] firefoxDirs = lib.listFiles(new FileFilter() {
+ public boolean accept(File pathname) {
+ return pathname != null&& pathname.getName().startsWith("firefox")
+ && pathname.isDirectory();
+ }
+ });
+ for (int j = firefoxDirs.length - 1; browser == null && j >= 0; j--) {
+ System.out.println("------>firefoxDir#" + j + ": " + firefoxDirs[j].getPath());
+ File[] firefoxes = firefoxDirs[j].listFiles(new FileFilter() {
+ public boolean accept(File pathname) {
+ boolean result = false;
+ if (pathname != null && pathname.isFile()) {
+ String name = pathname.getName();
+ result = "firefox".equals(name) || "firefox-bin".equals(name);
+ }
+ return result;
+ }
+ });
+ for (int k = firefoxes.length - 1; browser == null && k >= 0; k--) {
+ System.out.println("-------->firefox#" + k + ": " + firefoxes[k].getPath());
+ browser = "*firefox " + firefoxes[k].getPath();
+ }
+ }
+ }
+ }
+ return browser;
+ }
private void setFileExtensionContent() {
try {
Added: trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml 2008-12-08 18:18:38 UTC (rev 11653)
@@ -0,0 +1,111 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAANe">
+ <test name="all_all_neko">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="all_all_none">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="all_all_tidy">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="all_default_neko">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="all_default_none">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="all_default_tidy">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_all_neko">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_all_none">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_all_tidy">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_default_neko">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_default_none">
+ <parameter name="browser" value="*firefox"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="default_default_tidy">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
16 years, 1 month
JBoss Rich Faces SVN: r11652 - in trunk/samples/queue-sample/src/main/webapp: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-08 12:36:50 -0500 (Mon, 08 Dec 2008)
New Revision: 11652
Added:
trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml
Modified:
trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml
trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5244
Added: trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml (rev 0)
+++ trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml 2008-12-08 17:36:50 UTC (rev 11652)
@@ -0,0 +1,63 @@
+<html
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j">
+ <head>
+ <title>Events blocking and status check page</title>
+ </head>
+ <body>
+ <f:view>
+ <ui:include src="/templates/navigation.xhtml" />
+
+ <a4j:status startText="...link status - request running..." startStyle="color: green" id="linkStatus" forceId="true" />
+ <a4j:status startText="...queue status - request running..." startStyle="color: green" id="queueStatus" forceId="true" />
+ <h:form id="form">
+ <fieldset>
+
+ <h:outputLabel for="queueRequestDelay" value="Queue request delay " />
+ <h:inputText id="queueRequestDelay" value="#{bean.queueRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel for="clientRequestDelay" value="Client request delay " />
+ <h:inputText id="clientRequestDelay" value="#{bean.clientRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel for="processRequestDelay" value="Process request delay " />
+ <h:inputText id="processRequestDelay" value="#{bean.processRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel value="Poll enabled" for="pollEnabled" />
+ <h:selectBooleanCheckbox value="#{bean.pollEnabled}" id="pollEnabled" />
+ <br />
+
+ <h:commandButton value="Apply values" />
+ <br />
+
+ </fieldset>
+ <a4j:queue name="queue" status="queueStatus" size="3"
+ onrequestqueue="if (this.getSize() == this.getMaximumSize()) {document.getElementById('form:group').style.display = 'none'}"
+ onrequestdequeue="document.getElementById('form:group').style.display = ''"
+ requestDelay="#{bean.queueRequestDelay}" />
+
+ <h:panelGroup id="group">
+ <a4j:commandLink actionListener="#{bean.processActionListener}" action="#{bean.processAction}"
+ value="Trigger link status" status="linkStatus" eventsQueue="queue" /><br />
+ <a4j:commandLink actionListener="#{bean.processActionListener}" action="#{bean.processAction}"
+ value="Trigger queue status" eventsQueue="queue" /><br />
+ <a4j:commandLink actionListener="#{bean.processActionListener}" action="#{bean.processAction}"
+ value="Trigger queue status II" eventsQueue="queue" /><br />
+ </h:panelGroup>
+ </h:form>
+ </f:view>
+ </body>
+</html>
Modified: trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml 2008-12-08 17:36:10 UTC (rev 11651)
+++ trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml 2008-12-08 17:36:50 UTC (rev 11652)
@@ -28,14 +28,18 @@
<td colspan="4">Queue - Q, Component - C</td>
</tr>
<tr id="handlersTableHeaders">
+ <td>onrequestqueue</td>
<td>onsubmit</td>
<td>onbeforedomupdate</td>
+ <td>onrequestdequeue</td>
<td>oncomplete</td>
<td>onerror</td>
</tr>
<tr>
+ <td id="onrequestqueueElt"></td>
<td id="onsubmitElt"></td>
<td id="onbeforedomupdateElt"></td>
+ <td id="onrequestdequeueElt"></td>
<td id="oncompleteElt"></td>
<td id="onerrorElt"></td>
</tr>
@@ -60,6 +64,8 @@
resetCells();
var events = {
+ "onrequestqueue": ["query", "options", "event"],
+ "onrequestdequeue": ["query", "options", "event"],
"onbeforedomupdate": ["request", "event", "data"],
"onsubmit": ["request"],
"oncomplete": ["request", "event", "data"],
@@ -80,7 +86,9 @@
}
//]]></script>
<a4j:queue name="queue" onsubmit="handlers['queue:onsubmit'](request)" onerror="handlers['queue:onerror'](request, status, message)"
- oncomplete="handlers['queue:oncomplete'](request, event, data)" onbeforedomupdate="handlers['queue:onbeforedomupdate'](request, event, data)" />
+ onrequestdequeue="handlers['queue:onrequestdequeue'](query, options, event)" onrequestqueue="handlers['queue:onrequestqueue'](query, options, event)"
+ oncomplete="handlers['queue:oncomplete'](request, event, data)"
+ onbeforedomupdate="handlers['queue:onbeforedomupdate'](request, event, data)" />
<h:form>
<h:panelGrid columns="1">
Modified: trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml 2008-12-08 17:36:10 UTC (rev 11651)
+++ trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml 2008-12-08 17:36:50 UTC (rev 11652)
@@ -14,6 +14,8 @@
<h:outputLink value="sized-queue.jsf">Size exceed behaviors</h:outputLink>
<h:outputText value=" " />
<h:outputLink value="events.jsf">Events handling</h:outputLink>
+ <h:outputText value=" " />
+ <h:outputLink value="blocked-queue.jsf">Queue blocking and status</h:outputLink>
<br />
</ui:composition>
16 years, 1 month
JBoss Rich Faces SVN: r11651 - in trunk/ui/core/src/main: java/org/ajax4jsf/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-08 12:36:10 -0500 (Mon, 08 Dec 2008)
New Revision: 11651
Modified:
trunk/ui/core/src/main/config/component/queue.xml
trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-5244
Modified: trunk/ui/core/src/main/config/component/queue.xml
===================================================================
--- trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 17:34:44 UTC (rev 11650)
+++ trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 17:36:10 UTC (rev 11651)
@@ -93,7 +93,20 @@
<classname>java.lang.String</classname>
<description>A script expression; a size is exceed</description>
</property>
+ <property>
+ <name>onrequestqueue</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>onrequestdequeue</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>status</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property hidden="true">
<name>rendered</name>
</property>
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java 2008-12-08 17:34:44 UTC (rev 11650)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java 2008-12-08 17:36:10 UTC (rev 11651)
@@ -75,7 +75,11 @@
public abstract boolean isIgnoreDupResponses();
public abstract void setIgnoreDupResponses(boolean ignoreDupResponses);
+ public abstract String getOnrequestqueue();
+ public abstract void setOnrequestqueue(String onrequestqueue);
+ public abstract String getOnrequestdequeue();
+ public abstract void setOnrequestdequeue(String onrequestdequeue);
@Override
public String getFamily() {
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java 2008-12-08 17:34:44 UTC (rev 11650)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java 2008-12-08 17:36:10 UTC (rev 11651)
@@ -118,6 +118,16 @@
data.addQueueAttribute("onsizeexceeded", new JSFunctionDefinition("query", "options", "event").addToBody(onsizeexceeded));
}
+ String onrequestqueue = queue.getOnrequestqueue();
+ if (utils.shouldRenderAttribute(onrequestqueue)) {
+ data.addQueueAttribute("onrequestqueue", new JSFunctionDefinition("query", "options", "event").addToBody(onrequestqueue));
+ }
+
+ String onrequestdequeue = queue.getOnrequestdequeue();
+ if (utils.shouldRenderAttribute(onrequestdequeue)) {
+ data.addQueueAttribute("onrequestdequeue", new JSFunctionDefinition("query", "options", "event").addToBody(onrequestdequeue));
+ }
+
for (String attributeName : REQUEST_ATTRIBUTES) {
Object value = attributes.get(attributeName);
if (utils.shouldRenderAttribute(value)) {
@@ -125,6 +135,11 @@
}
}
+ String status = AjaxRendererUtils.getAjaxStatus(queue);
+ if (utils.shouldRenderAttribute(status)) {
+ data.addRequestAttribute(AjaxRendererUtils.STATUS_ATTR_NAME, status);
+ }
+
String onBeforeDomUpdate = queue.getOnbeforedomupdate();
if (utils.shouldRenderAttribute(onBeforeDomUpdate)) {
data.addRequestAttribute(QUEUE_ONBEFOREDOMUPDATE_ATTRIBUTE, AjaxRendererUtils.buildAjaxOnBeforeDomUpdate(onBeforeDomUpdate));
16 years, 1 month
JBoss Rich Faces SVN: r11650 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-08 12:34:44 -0500 (Mon, 08 Dec 2008)
New Revision: 11650
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
Log:
https://jira.jboss.org/jira/browse/RF-5244
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-12-08 17:24:32 UTC (rev 11649)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-12-08 17:34:44 UTC (rev 11650)
@@ -55,11 +55,9 @@
if(window.document.documentElement != _this._documentElement){
LOG.warn("Page for current request have been unloaded - abort processing" );
_this.abort();
- _this = undefined;
return;
};
if(_this._aborted){
- _this = undefined;
return;
};
LOG.debug("Reqest state : "+_this._request.readyState );
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-12-08 17:24:32 UTC (rev 11649)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-12-08 17:34:44 UTC (rev 11650)
@@ -121,6 +121,10 @@
setEventsCount: function(newCount) {
this.eventsCount = newCount;
+ },
+
+ getEventArguments: function() {
+ return [this.query, this.options, this.event];
}
});
@@ -161,7 +165,11 @@
}
},
- getQueueSize: function() {
+ getSize: function() {
+ return this.items.length;
+ },
+
+ getMaximumSize: function() {
return this.queueOptions.size;
},
@@ -174,6 +182,24 @@
return policy;
},
+ queue: function(entry) {
+ this.items.push(entry);
+
+ if (this.queueOptions.onrequestqueue) {
+ LOG.debug("Call onrequestqueue handler");
+ this.queueOptions.onrequestqueue.apply(this, entry.getEventArguments());
+ }
+ },
+
+ dequeue: function() {
+ var entry = this.items.shift();
+
+ if (this.queueOptions.onrequestdequeue) {
+ LOG.debug("Call onrequestdequeue handler");
+ this.queueOptions.onrequestdequeue.apply(this, entry.getEventArguments());
+ }
+ },
+
push: function(query, opts, event) {
var options = extendOptions.call(this, opts);
@@ -198,7 +224,7 @@
LOG.debug("Current request in queue '" + this.name + "' has been aborted");
//remove last (that is actually first) from queue - will be safer to do that in LinkedList
- this.items.shift();
+ this.dequeue();
}
} else {
LOG.debug("Combine similar requests and reset timer");
@@ -231,7 +257,7 @@
}
if (this.queueOptions.onsizeexceeded) {
- this.queueOptions.onsizeexceeded.call(this, query, opts, event);
+ this.queueOptions.onsizeexceeded.apply(this, entry.getEventArguments());
}
// TODO: create one function that will be implement this functionality // function (behaviorFlag, entry): should return handled flag
if (b == DROP_NEW) {
@@ -274,7 +300,7 @@
}
if (!handled) {
- this.items.push(entry);
+ this.queue(entry);
LOG.debug("New request added to queue '" + this.name + "'. Queue similarityGroupingId changed to " + similarityGroupingId);
@@ -285,7 +311,7 @@
pop: function() {
LOG.debug("After request: queue '" + this.name + "'");
- this.items.shift();
+ this.dequeue();
LOG.debug("There are " + this.items.length + " requests more in this queue");
16 years, 1 month
JBoss Rich Faces SVN: r11649 - trunk/ui/suggestionbox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-12-08 12:24:32 -0500 (Mon, 08 Dec 2008)
New Revision: 11649
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
Log:
https://jira.jboss.org/jira/browse/RF-5191
SuggestionBox: frequency deafult value is changed
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-12-08 17:21:54 UTC (rev 11648)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-12-08 17:24:32 UTC (rev 11649)
@@ -249,8 +249,7 @@
Delay (in seconds) before activating the suggestion
pop-up. Default value is 400ms
</description>
- <defaultvalue>"400ms"</defaultvalue>
- </property>
+ </property>
<property>
<name>minChars</name>
<classname>java.lang.String</classname>
16 years, 1 month
JBoss Rich Faces SVN: r11648 - trunk/ui/suggestionbox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-12-08 12:21:54 -0500 (Mon, 08 Dec 2008)
New Revision: 11648
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
Log:
https://jira.jboss.org/jira/browse/RF-5191
SuggestionBox: frequency deafult value is changed
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-12-08 16:48:41 UTC (rev 11647)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-12-08 17:21:54 UTC (rev 11648)
@@ -247,8 +247,9 @@
<classname>double</classname>
<description>
Delay (in seconds) before activating the suggestion
- pop-up
+ pop-up. Default value is 400ms
</description>
+ <defaultvalue>"400ms"</defaultvalue>
</property>
<property>
<name>minChars</name>
16 years, 1 month
JBoss Rich Faces SVN: r11647 - trunk/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-12-08 11:48:41 -0500 (Mon, 08 Dec 2008)
New Revision: 11647
Modified:
trunk/ui/core/src/main/config/component/queue.xml
Log:
RF-4664 - language correction has been done
Modified: trunk/ui/core/src/main/config/component/queue.xml
===================================================================
--- trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 16:46:17 UTC (rev 11646)
+++ trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 16:48:41 UTC (rev 11647)
@@ -31,42 +31,41 @@
<property>
<name>size</name>
<classname>int</classname>
- <description>Defines the number of items allowed in the queue at one time.</description>
+ <description>Defines the number of requests allowed in the queue at one time.</description>
</property>
<property>
<name>name</name>
<classname>java.lang.String</classname>
- <description>The optional name of this component</description>
+ <description>The name of the queue</description>
<defaultvalue>""</defaultvalue>
</property>
<property >
<name>requestDelay</name>
<classname>int</classname>
- <description>Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send.
- When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already</description>
+ <description>Attribute defines the time (in ms) the request will be waiting in the queue before it is ready to be sent.</description>
</property>
<property>
<name>ignoreDupResponses</name>
<classname>boolean</classname>
- <description>Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is in a queue already.
- ignoreDupResponses="true" does not cancel the request while it is processed on the server, but just allows to avoid unnecessary updates on the client side if the response isn't actual now</description>
+ <description>Attribute allows you to ignore an Ajax response produced by a request if the newest 'similar' request is in the queue already.
+ ignoreDupResponses="true" does not cancel the request while it is processed on the server, but just allows avoiding unnecessary updates on the client side if the response isn't actual now</description>
</property>
<property>
<name>timeout</name>
<classname>int</classname>
- <description>Response waiting time on a particular request. If a response is not received during this time, the request is aborted</description>
+ <description>Waiting time for response on a particular request. If no response is received during this time, the request is aborted</description>
</property>
<property>
<name>disabled</name>
<classname>boolean</classname>
- <description>If "true", disable this component on page.</description>
+ <description>If "true", disables this component on page.</description>
</property>
<property>
<name>onsubmit</name>
<classname>java.lang.String</classname>
- <description>JavaScript code for call before submission of ajax event</description>
+ <description>JavaScript code for call before submission of an ajax request</description>
</property>
<property>
<name>onbeforedomupdate</name>
@@ -81,7 +80,7 @@
<property>
<name>onerror</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; event fires whenever an JavaScript error occurs</description>
+ <description>HTML: a script expression; event fires whenever an JavaScript server side error occurs</description>
</property>
<property>
<name>sizeExceededBehavior</name>
16 years, 1 month
JBoss Rich Faces SVN: r11646 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-12-08 11:46:17 -0500 (Mon, 08 Dec 2008)
New Revision: 11646
Modified:
trunk/docs/userguide/en/src/main/docbook/included/queue.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/queue.xml
Log:
RF-4664 - new information and description of the component have been added; language correction has been done
Modified: trunk/docs/userguide/en/src/main/docbook/included/queue.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/queue.desc.xml 2008-12-08 16:45:58 UTC (rev 11645)
+++ trunk/docs/userguide/en/src/main/docbook/included/queue.desc.xml 2008-12-08 16:46:17 UTC (rev 11646)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter>
+<chapter role="new">
<section>
<sectioninfo>
<keywordset>
@@ -7,6 +7,7 @@
</keywordset>
</sectioninfo>
<title>Description</title>
- <para>The <emphasis role="bold"><property><a4j:queue></property></emphasis> component creates queues that other components can reference and use.</para>
+ <para>The <emphasis role="bold"><property><a4j:queue></property></emphasis> component creates queues that other components can use and reference.</para>
+ <para>User can create a default queue for a form ( overriding the global default queue ).</para>
</section>
</chapter>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/queue.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/queue.xml 2008-12-08 16:45:58 UTC (rev 11645)
+++ trunk/docs/userguide/en/src/main/docbook/included/queue.xml 2008-12-08 16:46:17 UTC (rev 11646)
@@ -65,16 +65,13 @@
<itemizedlist>
<listitem>
<para>
- A user can set a queue globally in "web.xml". You don't need set the queue on the page itself. The global queue can be used by all components. Example you can see below:
+ A user can set a queue globally in "web.xml". You don't need set the queue on the page itself. The global queue can be used by all components. You can see the example below:
</para>
<programlisting role="XML"><![CDATA[<context-param>
<param-name>org.richfaces.queue.global.enabled</param-name>
<param-value>true</param-value>
</context-param>]]></programlisting>
<para>
- The global queue can be disabled for specifically view's application.
- </para>
- <para>
In order to enable/disable a global queue see the following examples:
</para>
<programlisting role="XML"><![CDATA[<a4j:queue name="org.richfaces.global_queue" disabled="false"... />]]></programlisting>
@@ -85,7 +82,7 @@
</listitem>
<listitem>
<para>
- A user can create separate queue for specific form with the help of the <emphasis role="bold"><property><a4j:form></property></emphasis> or <emphasis role="bold"><property><h:form></property></emphasis> tags.
+ A user can create a separate queue for specific form with the help of the <emphasis role="bold"><property><a4j:form></property></emphasis> or <emphasis role="bold"><property><h:form></property></emphasis> tags.
It will be the global queue only for this form.
</para>
<para>
@@ -111,7 +108,7 @@
<a4j:queue <a4j:queue name="fooQueue" ... />
...
</a4j:form>]]></programlisting>
- <para>If you use <emphasis role="bold"><property><a4j:form></property></emphasis> tag, you can reference a named queue as the form's default.</para>
+ <para>If you use the <emphasis role="bold"><property><a4j:form></property></emphasis> tag, you can reference a named queue as the form's default.</para>
<para>
<emphasis role="bold">
Example:
@@ -136,19 +133,49 @@
<a4j:commandButton eventsQueue="fooQueue" ... >]]></programlisting>
<para>
- As a result all requests generated through the onblur of the <emphasis><property><h:inputText></property></emphasis> component, and clicking of the <emphasis><property><h:commandButton></property></emphasis> will be funneled through the <code>"fooQueue"</code>.
+ As a result all requests generated through the onblur of the <emphasis role="bold"><property><h:inputText></property></emphasis> component, and clicking of the <emphasis role="bold"><property><h:commandButton></property></emphasis> will be funneled through the <code>"fooQueue"</code>.
</para>
<para>
- If you have a try to reference a nonexistent queue a new named queue will be created with all default settings.
+ If you try to refer to the nonexistent queue the new named queue will be created with all default settings.
</para>
</listitem>
</itemizedlist>
<para>
- The <emphasis><property>"size"</property></emphasis> attribute help you to set the number of items allowed in the queue at one time.
+ The <emphasis><property>"size"</property></emphasis> attribute helps you to set the number of requests allowed in the queue at one time.
</para>
<para>
-
+ The <emphasis><property>"sizeExceededBehavior"</property></emphasis> attribute defines four strategies of the queue's behavior if the number of the requests waiting in the queue is exceeded:
</para>
+ <itemizedlist>
+ <listitem>
+ <para>dropNext - this strategy is default. It drops next request that should be fired</para>
+ </listitem>
+ <listitem>
+ <para>dropNew - it drops the incoming request</para>
+ </listitem>
+ <listitem>
+ <para>fireNext - with the help of this strategy you can immediately fire the next request in line to be fired</para>
+ </listitem>
+ <listitem>
+ <para>fireNew - This type of the strategy immediately fires the incoming request.</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <emphasis><property>"requestDelay"</property></emphasis> attribute defines time delay for all the requests which fired using this queue.
+ </para>
+ <para>
+ <emphasis role="bold">
+ Example:
+ </emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:queue requestDelay="2000" ... />]]></programlisting>
+ <para>
+ As a result all the requests which were fired using this queue will have 2 sec delay.
+ </para>
+ <para>
+ The requests collect in the queue, combining similar ones, during request delay.
+ User should remember that such requests can combine, if they are raised sequentially, in order to not block the queue and not to change the requests order.
+ </para>
</section>
<section>
16 years, 1 month
JBoss Rich Faces SVN: r11645 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-08 11:45:58 -0500 (Mon, 08 Dec 2008)
New Revision: 11645
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA2.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA2.xls
===================================================================
(Binary files differ)
16 years, 1 month
JBoss Rich Faces SVN: r11644 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-08 11:32:02 -0500 (Mon, 08 Dec 2008)
New Revision: 11644
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA2.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA2.xls
===================================================================
(Binary files differ)
16 years, 1 month