JBoss Rich Faces SVN: r15824 - in branches/sandbox/3.3.X_JSF2: framework and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-11-04 13:10:31 -0500 (Wed, 04 Nov 2009)
New Revision: 15824
Modified:
branches/sandbox/3.3.X_JSF2/framework/api/pom.xml
branches/sandbox/3.3.X_JSF2/framework/impl/pom.xml
branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/richfaces/component/UIRangedNumberInput.java
branches/sandbox/3.3.X_JSF2/framework/jsf-test/pom.xml
branches/sandbox/3.3.X_JSF2/framework/pom.xml
branches/sandbox/3.3.X_JSF2/framework/test/pom.xml
branches/sandbox/3.3.X_JSF2/pom.xml
branches/sandbox/3.3.X_JSF2/ui/pom.xml
Log:
Add jsf2 profile
Modified: branches/sandbox/3.3.X_JSF2/framework/api/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/api/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/api/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -8,7 +8,7 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<name>Java Server Faces AJAX framework API</name>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
<dependencies>
<dependency>
<groupId>commons-collections</groupId>
Modified: branches/sandbox/3.3.X_JSF2/framework/impl/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/impl/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/impl/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -9,7 +9,7 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
<name>Java Server Faces AJAX framework implementation</name>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
<build>
<resources>
<resource>
@@ -56,7 +56,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-javascript-plugin</artifactId>
- <version>${project.version}</version>
+ <version>${root.version}</version>
<executions>
<execution>
<goals>
@@ -161,7 +161,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-11-04 18:10:31 UTC (rev 15824)
@@ -283,7 +283,7 @@
* @param phaseId -
* phase, for which events must be processed.
*/
- void broadcastEvents(FacesContext context, PhaseId phaseId) {
+ public void broadcastEvents(FacesContext context, PhaseId phaseId) {
EventsQueue[] events = getEvents();
EventsQueue anyPhaseEvents = events[PhaseId.ANY_PHASE.getOrdinal()];
EventsQueue phaseEvents = events[phaseId.getOrdinal()];
Modified: branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/richfaces/component/UIRangedNumberInput.java
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/richfaces/component/UIRangedNumberInput.java 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/impl/src/main/java/org/richfaces/component/UIRangedNumberInput.java 2009-11-04 18:10:31 UTC (rev 15824)
@@ -102,7 +102,7 @@
return new Double(object.toString());
}
- private boolean isEmpty(Object newValue) {
+ public static boolean isEmpty(Object newValue) {
if (newValue == null) {
return true;
}
Modified: branches/sandbox/3.3.X_JSF2/framework/jsf-test/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/jsf-test/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/jsf-test/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -10,7 +10,60 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>jsf-test</artifactId>
<name>jsf-test</name>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
+ <profiles>
+ <profile>
+ <id>jsf2</id>
+ <properties>
+ <jsf.api.groupId>com.sun.faces</jsf.api.groupId>
+ <jsf.impl.groupId>com.sun.faces</jsf.impl.groupId>
+ <jsf.api.version>2.0.0-Beta2</jsf.api.version>
+ <jsf.impl.version>2.0.0-Beta2</jsf.impl.version>
+ <richfaces.version>3.3.3-jsf2-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.0-Beta2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>2.0.0-Beta2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+<profile>
+ <id>jsf1.2</id>
+ <properties>
+ <jsf.api.groupId>javax.faces</jsf.api.groupId>
+ <jsf.impl.groupId>javax.faces</jsf.impl.groupId>
+ <jsf.api.version>1.2_12</jsf.api.version>
+ <jsf.impl.version>1.2_12</jsf.impl.version>
+ <richfaces.version>3.3.3-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_12</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_12</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -23,12 +76,6 @@
<version>2.4</version>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_12</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>el-impl</groupId>
<artifactId>el-impl</artifactId>
<version>1.0</version>
@@ -99,12 +146,6 @@
<version>1.2</version>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
Modified: branches/sandbox/3.3.X_JSF2/framework/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>framework</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
<packaging>pom</packaging>
<name>Java Server Faces AJAX framework</name>
<build>
@@ -54,6 +54,46 @@
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>jsf2</id>
+ <properties>
+ <jsf.api.groupId>com.sun.faces</jsf.api.groupId>
+ <jsf.impl.groupId>com.sun.faces</jsf.impl.groupId>
+ <jsf.api.version>2.0.0-Beta2</jsf.api.version>
+ <jsf.impl.version>2.0.0-Beta2</jsf.impl.version>
+ <richfaces.version>3.3.3-jsf2-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.0-Beta2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+<profile>
+ <id>jsf1.2</id>
+ <properties>
+ <jsf.api.groupId>javax.faces</jsf.api.groupId>
+ <jsf.impl.groupId>javax.faces</jsf.impl.groupId>
+ <jsf.api.version>1.2_12</jsf.api.version>
+ <jsf.impl.version>1.2_12</jsf.impl.version>
+ <richfaces.version>3.3.3-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_12</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -79,30 +119,24 @@
<version>1.0.4</version>
</dependency>
<dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
+
<dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
Modified: branches/sandbox/3.3.X_JSF2/framework/test/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/framework/test/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/framework/test/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -7,9 +7,50 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
<name>Ajax4Jsf test framework</name>
<url>https://ajax4jsf.dev.java.net</url>
+ <profiles>
+ <profile>
+ <id>jsf2</id>
+ <properties>
+ <jsf.api.groupId>com.sun.faces</jsf.api.groupId>
+ <jsf.impl.groupId>com.sun.faces</jsf.impl.groupId>
+ <jsf.api.version>2.0.0-Beta2</jsf.api.version>
+ <jsf.impl.version>2.0.0-Beta2</jsf.impl.version>
+ <richfaces.version>3.3.3-jsf2-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.0-Beta2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+<profile>
+ <id>jsf1.2</id>
+ <properties>
+ <jsf.api.groupId>javax.faces</jsf.api.groupId>
+ <jsf.impl.groupId>javax.faces</jsf.impl.groupId>
+ <jsf.api.version>1.2_12</jsf.api.version>
+ <jsf.impl.version>1.2_12</jsf.impl.version>
+ <richfaces.version>3.3.3-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_12</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -42,14 +83,9 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_12</version>
- </dependency>
- <dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>1.14</version>
Modified: branches/sandbox/3.3.X_JSF2/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -309,6 +309,30 @@
</reporting>
</profile>
<profile>
+ <id>jsf2</id>
+ <properties>
+ <jsf.api.groupId>com.sun.faces</jsf.api.groupId>
+ <jsf.impl.groupId>com.sun.faces</jsf.impl.groupId>
+ <jsf.api.version>2.0.0-Beta2</jsf.api.version>
+ <jsf.impl.version>2.0.0-Beta2</jsf.impl.version>
+ <richfaces.version>3.3.3-jsf2-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+
+ </profile>
+<profile>
+ <id>jsf1.2</id>
+ <properties>
+ <jsf.api.groupId>javax.faces</jsf.api.groupId>
+ <jsf.impl.groupId>javax.faces</jsf.impl.groupId>
+ <jsf.api.version>1.2_12</jsf.api.version>
+ <jsf.impl.version>1.2_12</jsf.impl.version>
+ <richfaces.version>3.3.3-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+
+ </profile>
+ <profile>
<id>beet</id>
<activation>
<property>
Modified: branches/sandbox/3.3.X_JSF2/ui/pom.xml
===================================================================
--- branches/sandbox/3.3.X_JSF2/ui/pom.xml 2009-11-04 11:00:56 UTC (rev 15823)
+++ branches/sandbox/3.3.X_JSF2/ui/pom.xml 2009-11-04 18:10:31 UTC (rev 15824)
@@ -80,6 +80,46 @@
</resources>
</build>
</profile>
+ <profile>
+ <id>jsf2</id>
+ <properties>
+ <jsf.api.groupId>com.sun.faces</jsf.api.groupId>
+ <jsf.impl.groupId>com.sun.faces</jsf.impl.groupId>
+ <jsf.api.version>2.0.0-Beta2</jsf.api.version>
+ <jsf.impl.version>2.0.0-Beta2</jsf.impl.version>
+ <richfaces.version>3.3.3-jsf2-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.0-Beta2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+<profile>
+ <id>jsf1.2</id>
+ <properties>
+ <jsf.api.groupId>javax.faces</jsf.api.groupId>
+ <jsf.impl.groupId>javax.faces</jsf.impl.groupId>
+ <jsf.api.version>1.2_12</jsf.api.version>
+ <jsf.impl.version>1.2_12</jsf.impl.version>
+ <richfaces.version>3.3.3-SNAPSHOT</richfaces.version>
+ <root.version>3.3.3-SNAPSHOT</root.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_12</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+
</profiles>
<modules>
<module>core</module>
@@ -138,12 +178,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>${richfaces.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -182,11 +222,5 @@
<version>1.1.2</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
15 years, 1 month
JBoss Rich Faces SVN: r15823 - branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-11-04 06:00:56 -0500 (Wed, 04 Nov 2009)
New Revision: 15823
Modified:
branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/AbstractSeleniumTestCase.java
Log:
* added method waitForElement(String, int)
* method waitForElement(String) refactored
Modified: branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/AbstractSeleniumTestCase.java
===================================================================
--- branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/AbstractSeleniumTestCase.java 2009-11-04 10:27:01 UTC (rev 15822)
+++ branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/AbstractSeleniumTestCase.java 2009-11-04 11:00:56 UTC (rev 15823)
@@ -495,18 +495,23 @@
* the locator of the element to be waited for
*/
public void waitForElement(String locator) {
- for (int second = 0;; second++) {
- if (second >= ELEM_TIMEOUT) {
- Assert.fail("Element " + locator + " not found.");
+ waitForElement(locator, 1000);
+ }
+
+ /**
+ * Waits for element to appear on the screen. Used mostly in AJAX based
+ * tests.
+ *
+ * @param locator
+ * the locator of the element to be waited for
+ * @param step interval between two pollings
+ */
+ public void waitForElement(final String locator, int step) {
+ Wait.failWith("Element \"" + locator + "\" not found.").interval(step).timeout(ELEM_TIMEOUT).until(new Condition() {
+ public boolean isTrue() {
+ return selenium.isElementPresent(locator);
}
- try {
- if (selenium.isElementPresent(locator)) {
- break;
- }
- } catch (Exception e) {
- }
- waitFor(1000);
- }
+ });
}
/**
15 years, 1 month
JBoss Rich Faces SVN: r15822 - branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-11-04 05:27:01 -0500 (Wed, 04 Nov 2009)
New Revision: 15822
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
Log:
https://jira.jboss.org/jira/browse/RF-8066
https://jira.jboss.org/jira/browse/RF-7975
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2009-11-04 08:43:52 UTC (rev 15821)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2009-11-04 10:27:01 UTC (rev 15822)
@@ -38,7 +38,7 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>false</param-value>
+ <param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
@@ -54,11 +54,11 @@
</context-param>
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>ALL</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>ALL</param-value>
</context-param>
<listener>
15 years, 1 month
JBoss Rich Faces SVN: r15821 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: java/org/jboss/richfaces/integrationTest/panelBar and 15 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-11-04 03:43:52 -0500 (Wed, 04 Nov 2009)
New Revision: 15821
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelCustomizationTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelBar/PanelBarTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelMenu/PanelMenuTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/simpleTogglePanel/SimpleTogglePanelTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tabPanel/TabPanelTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/toolBar/ToolBarTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/messages.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelBar/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/messages.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/simpleTogglePanel/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spacer/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tabPanel/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/togglePanel/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/toolBar/locators.properties
Log:
* Xpath locator changed to jQuery
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelCustomizationTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelCustomizationTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelCustomizationTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -46,8 +46,7 @@
private final String MSG_CUST_THIRD_CLASS_2 = getMsg("CUST_THIRD_CLASS_2");
private final String MSG_CUST_FOURTH_HEADER = getMsg("CUST_FOURTH_HEADER");
private final String MSG_CUST_FOURTH_CLASS = getMsg("CUST_FOURTH_CLASS");
- private final int MSG_CUST_FIFTH_COUNT = Integer.parseInt(getMsg("CUST_FIFTH_COUNT"));
-
+
// locators
private final String LOC_CUST_FIRST_PANEL_HEADER = getLoc("CUST_FIRST_PANEL_HEADER");
private final String LOC_CUST_SECOND_PANEL_HEADER = getLoc("CUST_SECOND_PANEL_HEADER");
@@ -55,7 +54,8 @@
private final String LOC_CUST_THIRD_PANEL_BODY = getLoc("CUST_THIRD_PANEL_BODY");
private final String LOC_CUST_FOURTH_PANEL_BODY = getLoc("CUST_FOURTH_PANEL_BODY");
private final String LOC_CUST_FOURTH_PANEL_HEADER = getLoc("CUST_FOURTH_PANEL_HEADER");
- private final String LOC_CUST_FIFTH_PANEL_PARTS = getLoc("CUST_FIFTH_PANEL_PARTS");
+ private final String LOC_CUST_FIFTH_PANEL_BODY = getLoc("CUST_FIFTH_PANEL_BODY");
+ private final String LOC_CUST_FIFTH_PANEL_HEADER = getLoc("CUST_FIFTH_PANEL_HEADER");
/**
* Tests first panel. It checks panel header's text and class attribute.
@@ -106,8 +106,11 @@
*/
@Test
public void testFifthPanel() {
- int count = selenium.getXpathCount(LOC_CUST_FIFTH_PANEL_PARTS).intValue();
- assertEquals(count, MSG_CUST_FIFTH_COUNT, "The fifth panel should have no header.");
+ boolean isPresent = selenium.isElementPresent(LOC_CUST_FIFTH_PANEL_HEADER);
+ assertEquals(isPresent, false, "The fifth panel should have no header.");
+
+ isPresent = selenium.isElementPresent(LOC_CUST_FIFTH_PANEL_BODY);
+ assertEquals(isPresent, true, "The fifth panel should have body.");
}
/**
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panel/PanelTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -62,7 +62,7 @@
*/
@Test
public void testFirstExample() {
- int count = selenium.getXpathCount(LOC_FIRST_DIVS).intValue();
+ int count = getJQueryCount(LOC_FIRST_DIVS);
assertEquals(count, 2, MSG_FIRST_PANEL_TWO_PARTS);
String text = selenium.getText(LOC_FIRST_HEADER);
@@ -74,7 +74,7 @@
*/
@Test
public void testSecondExample() {
- int count = selenium.getXpathCount(LOC_SECOND_DIVS).intValue();
+ int count = getJQueryCount(LOC_SECOND_DIVS);
assertEquals(count, 1, MSG_SECOND_PANEL_NO_HEADER);
}
@@ -86,19 +86,19 @@
*/
@Test
public void testThirdExample() {
- int count = selenium.getXpathCount(LOC_THIRD_DIVS).intValue();
+ int count = getJQueryCount(LOC_THIRD_DIVS);
assertEquals(count, 2, MSG_THIRD_PANEL_TWO_PARTS);
String text = selenium.getText(LOC_THIRD_HEADER);
assertEquals(text, "", MSG_THIRD_HEADER);
- count = selenium.getXpathCount(LOC_THIRD_NESTED_PANELS).intValue();
+ count = getJQueryCount(LOC_THIRD_NESTED_PANELS);
assertEquals(count, 2, MSG_SHOULD_BE_TWO_NESTED_PANELS);
- count = selenium.getXpathCount(LOC_LEFT_NESTED_PANEL_LIST_LI).intValue();
+ count = getJQueryCount(LOC_LEFT_NESTED_PANEL_LIST_LI);
assertEquals(count, 6, MSG_SIX_ITEMS_IN_LIST_LEFT);
- count = selenium.getXpathCount(LOC_RIGHT_NESTED_PANEL_LIST_LI).intValue();
+ count = getJQueryCount(LOC_RIGHT_NESTED_PANEL_LIST_LI);
assertEquals(count, 6, MSG_SIX_ITEMS_IN_LIST_RIGHT);
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelBar/PanelBarTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelBar/PanelBarTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelBar/PanelBarTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -61,14 +61,14 @@
"Create a modern rich user interface look-and-feel with skins-based technology",
"Test the components, actions, listeners, and pages as you are creating them" };
- String text = selenium.getText(format(LOC_HEADER_2_N, 1));
+ String text = selenium.getText(format(LOC_HEADER_1_N, 0));
assertEquals(text, headers[0], format(MSG_HEADER_N, 1));
- assertTrue(isDisplayed(format(LOC_CONTENT_N, 1)), format(MSG_PANEL_N_SHOULD_BE_VISIBLE, 1));
+ assertTrue(isDisplayed(format(LOC_CONTENT_N, 0)), format(MSG_PANEL_N_SHOULD_BE_VISIBLE, 1));
- for (int i = 2; i < 8; i++) {
- text = selenium.getText(format(LOC_HEADER_1_N, i));
- assertEquals(text, headers[i - 1], format(MSG_HEADER_N, i));
- assertFalse(isDisplayed(format(LOC_CONTENT_N, i)), format(MSG_PANEL_N_SHOULD_NOT_BE_VISIBLE, i));
+ for (int i = 1; i < 7; i++) {
+ text = selenium.getText(format(LOC_HEADER_2_N, i));
+ assertEquals(text, headers[i], format(MSG_HEADER_N, i + 1));
+ assertFalse(isDisplayed(format(LOC_CONTENT_N, i)), format(MSG_PANEL_N_SHOULD_NOT_BE_VISIBLE, i + 1));
}
}
@@ -78,18 +78,18 @@
*/
@Test
public void testExpanding() {
- for (int i = 7; i > 0; i--) {
+ for (int i = 6; i >= 0; i--) {
selenium.click(format(LOC_HEADER_1_N, i));
// check that clicked panel is visible
- assertTrue(isDisplayed(format(LOC_CONTENT_N, i)), format(MSG_PANEL_N_SHOULD_BE_VISIBLE, i));
+ assertTrue(isDisplayed(format(LOC_CONTENT_N, i)), format(MSG_PANEL_N_SHOULD_BE_VISIBLE, i + 1));
// check that other panel are not visible
- for (int j = 1; j < 8; j++) {
+ for (int j = 0; j < 7; j++) {
if (j == i) {
continue;
}
- assertFalse(isDisplayed(format(LOC_CONTENT_N, j)), format(MSG_PANEL_N_SHOULD_NOT_BE_VISIBLE, i));
+ assertFalse(isDisplayed(format(LOC_CONTENT_N, j)), format(MSG_PANEL_N_SHOULD_NOT_BE_VISIBLE, i + 1));
}
}
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelMenu/PanelMenuTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelMenu/PanelMenuTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/panelMenu/PanelMenuTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -81,7 +81,7 @@
*/
@Test
public void testFirstGroup() {
- abstractTestGroupN(1);
+ abstractTestGroupN(0);
}
/**
@@ -93,7 +93,7 @@
*/
@Test
public void testSecondGroup() {
- abstractTestGroupN(2);
+ abstractTestGroupN(1);
}
/**
@@ -105,7 +105,7 @@
*/
@Test
public void testThirdGroup() {
- abstractTestGroupN(3);
+ abstractTestGroupN(2);
}
/**
@@ -119,34 +119,34 @@
public void testSubgroup() {
String text = null;
- selenium.click(format(LOC_GROUP_N_TEXT, 2));
+ selenium.click(format(LOC_GROUP_N_TEXT, 1));
// image before subgroup name
- text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_BEFORE, 2, 4));
+ text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_BEFORE, 1, 3));
assertTrue(text.contains("PanelMenuIconDisc"), MSG_DISK_BEFORE_GROUP_NAME);
// subgroup name
- text = selenium.getText(format(LOC_ITEM_M_N_TEXT, 2, 4));
+ text = selenium.getText(format(LOC_ITEM_M_N_TEXT, 1, 3));
assertEquals(text, "Group 2.4", MSG_NAME_OF_GROUP);
// image after subgroup name
- text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_AFTER, 2, 4));
+ text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_AFTER, 1, 3));
assertTrue(text.contains("PanelMenuIconSpacer"), MSG_IMAGE_AFTER_GROUP_NAME_SPACER);
- for (int i = 1; i < 4; i++) {
- assertFalse(isDisplayed(format(LOC_SUBITEM_M_STYLE, i)), format(MSG_SUBITEM_M_NOT_VISIBLE, i));
+ for (int i = 0; i < 3; i++) {
+ assertFalse(isDisplayed(format(LOC_SUBITEM_M_STYLE, i)), format(MSG_SUBITEM_M_NOT_VISIBLE, i + 1));
}
// click Group 2.4
- selenium.click(format(LOC_ITEM_M_N_TEXT, 2, 4));
+ selenium.click(format(LOC_ITEM_M_N_TEXT, 1, 3));
// image after subgroup name
- text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_AFTER, 2, 4));
+ text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_AFTER, 1, 3));
assertTrue(text.contains("PanelMenuIconSpacer"), MSG_IMAGE_AFTER_GROUP_NAME_SPACER);
- for (int i = 1; i < 4; i++) {
+ for (int i = 0; i < 3; i++) {
// check that items are not hidden
- assertTrue(isDisplayed(format(LOC_SUBITEM_M_STYLE, i)), format(MSG_SUBITEM_M_VISIBLE, i));
+ assertTrue(isDisplayed(format(LOC_SUBITEM_M_STYLE, i)), format(MSG_SUBITEM_M_VISIBLE, i + 1));
// check the image left of the item
text = selenium.getAttribute(format(LOC_SUBITEM_M_IMAGE, i));
@@ -166,39 +166,39 @@
assertEquals(text, "Nothing selected", MSG_CONTENT_OF_PANEL_ON_LOAD);
// check items on the first level (1.1, 1.2, etc.)
- for (int i = 1; i < 4; i++) {
+ for (int i = 0; i < 3; i++) {
final int newI = i;
selenium.click(format(LOC_GROUP_N_TEXT, i));
- for (int j = 1; j < 4; j++) {
+ for (int j = 0; j < 3; j++) {
final int newJ = j;
selenium.click(format(LOC_ITEM_M_N_TEXT, i, j));
Wait.until(new Condition() {
public boolean isTrue() {
- return format("Item {0}.{1} selected", newI, newJ).equals(selenium.getText(LOC_PANEL));
+ return format("Item {0}.{1} selected", newI + 1, newJ + 1).equals(selenium.getText(LOC_PANEL));
}
});
text = selenium.getText(LOC_PANEL);
- assertEquals(text, format("Item {0}.{1} selected", i, j), MSG_CONTENT_OF_PANEL);
+ assertEquals(text, format("Item {0}.{1} selected", i + 1, j + 1), MSG_CONTENT_OF_PANEL);
}
}
// check items on the second level (2.4.1, 2.4.2, 2.4.3)
- selenium.click(format(LOC_ITEM_M_N_TEXT, 2, 4));
- for (int i = 1; i < 4; i++) {
+ selenium.click(format(LOC_ITEM_M_N_TEXT, 1, 3));
+ for (int i = 0; i < 3; i++) {
final int newI = i;
selenium.click(format(LOC_SUBITEM_M_TEXT, i));
Wait.until(new Condition() {
public boolean isTrue() {
- return format("Item 2.4.{0} selected", newI).equals(selenium.getText(LOC_PANEL));
+ return format("Item 2.4.{0} selected", newI + 1).equals(selenium.getText(LOC_PANEL));
}
});
text = selenium.getText(LOC_PANEL);
- assertEquals(text, format("Item 2.4.{0} selected", i), MSG_CONTENT_OF_PANEL);
+ assertEquals(text, format("Item 2.4.{0} selected", i + 1), MSG_CONTENT_OF_PANEL);
}
}
@@ -235,14 +235,14 @@
// group name
text = selenium.getText(format(LOC_GROUP_N_TEXT, index));
- assertEquals(text, "Group " + index, MSG_NAME_OF_GROUP);
+ assertEquals(text, "Group " + (index + 1), MSG_NAME_OF_GROUP);
// image after group name
text = selenium.getAttribute(format(LOC_GROUP_N_IMAGE_AFTER, index));
assertTrue(text.contains("PanelMenuIconChevronDown"), MSG_IMAGE_AFTER_GROUP_NAME_DOWN);
- for (int i = 1; i < 4; i++) {
- assertFalse(isDisplayed(format(LOC_ITEM_M_N_STYLE, index, i)), format(MSG_ITEM_M_N_NOT_VISIBLE, index, i));
+ for (int i = 0; i < 3; i++) {
+ assertFalse(isDisplayed(format(LOC_ITEM_M_N_STYLE, index, i)), format(MSG_ITEM_M_N_NOT_VISIBLE, index + 1, i + 1));
}
selenium.click(format(LOC_GROUP_N_TEXT, index));
@@ -251,9 +251,9 @@
text = selenium.getAttribute(format(LOC_GROUP_N_IMAGE_AFTER, index));
assertTrue(text.contains("PanelMenuIconChevronUp"), MSG_IMAGE_AFTER_GROUP_NAME_UP);
- for (int i = 1; i < 4; i++) {
+ for (int i = 0; i < 3; i++) {
// check that items are not hidden
- assertTrue(isDisplayed(format(LOC_ITEM_M_N_STYLE, index, i)), format(MSG_ITEM_M_N_VISIBLE, index, i));
+ assertTrue(isDisplayed(format(LOC_ITEM_M_N_STYLE, index, i)), format(MSG_ITEM_M_N_VISIBLE, index + 1, i + 1));
// check the image left of the item
text = selenium.getAttribute(format(LOC_ITEM_M_N_IMAGE_BEFORE, index, i));
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/separator/SeparatorTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -64,10 +64,10 @@
*/
@Test
public void testFirstSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 1), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 0), "height");
assertEquals(text, MSG_FIRST_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 1));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 0));
assertEquals(text, MSG_FIRST_HASH, "Hash code of the image that makes the separator.");
}
@@ -77,15 +77,15 @@
*/
@Test
public void testSecondSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 2), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 1), "height");
assertEquals(text, MSG_SECOND_HEIGHT, "Height of the separator.");
- double widthFull = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 1), "width").replace("px", ""));
- double width75 = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 2), "width").replace("px", ""));
+ double widthFull = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 0), "width").replace("px", ""));
+ double width75 = Double.parseDouble(getStyle(format(LOC_SEPARATOR_N, 1), "width").replace("px", ""));
assertEquals(width75, widthFull * 0.75, "Width of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 2));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 1));
assertEquals(text, MSG_SECOND_HASH, "Hash code of the image that makes the separator.");
}
@@ -95,10 +95,10 @@
*/
@Test
public void testThirdSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 3), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 2), "height");
assertEquals(text, MSG_THIRD_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 3));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 2));
assertEquals(text, MSG_THIRD_HASH, "Hash code of the image that makes the separator.");
}
@@ -108,10 +108,10 @@
*/
@Test
public void testFourthSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 4), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 3), "height");
assertEquals(text, MSG_FOURTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 4));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 3));
assertEquals(text, MSG_FOURTH_HASH, "Hash code of the image that makes the separator.");
}
@@ -121,10 +121,10 @@
*/
@Test
public void testFifthSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 5), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 4), "height");
assertEquals(text, MSG_FIFTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 5));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 4));
assertEquals(text, MSG_FIFTH_HASH, "Hash code of the image that makes the separator.");
}
@@ -134,10 +134,10 @@
*/
@Test
public void testSixthSeparator() {
- String text = getStyle(format(LOC_SEPARATOR_N, 6), "height");
+ String text = getStyle(format(LOC_SEPARATOR_N, 5), "height");
assertEquals(text, MSG_SIXTH_HEIGHT, "Height of the separator.");
- text = getSeparatorHash(format(LOC_SEPARATOR_N, 6));
+ text = getSeparatorHash(format(LOC_SEPARATOR_N, 5));
assertEquals(text, MSG_SIXTH_HASH, "Hash code of the image that makes the separator.");
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/simpleTogglePanel/SimpleTogglePanelTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/simpleTogglePanel/SimpleTogglePanelTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/simpleTogglePanel/SimpleTogglePanelTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -92,7 +92,7 @@
*/
@Test
public void testSecondExampleServerSwitch() {
- abstractTestPanelInSecondExample(1, "Server Switch Type");
+ abstractTestPanelInSecondExample(0, "Server Switch Type");
}
/**
@@ -104,7 +104,7 @@
*/
@Test
public void testSecondExampleAjaxSwitch() {
- abstractTestPanelInSecondExample(2, "Ajax Switch Type");
+ abstractTestPanelInSecondExample(1, "Ajax Switch Type");
}
/**
@@ -116,7 +116,7 @@
*/
@Test
public void testSecondExampleClientSwitch() {
- abstractTestPanelInSecondExample(3, "Client Switch Type");
+ abstractTestPanelInSecondExample(2, "Client Switch Type");
}
/**
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tabPanel/TabPanelTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tabPanel/TabPanelTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tabPanel/TabPanelTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -71,47 +71,46 @@
String text;
// test the first tab panel
- for (int i = 3; i > 0; i--) {
+ for (int i = 2; i >= 0; i--) {
scrollIntoView(LOC_USAGE_EXAMPLE_HEADER, true); // scrolling is
// forgotten after
// page reload
- selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 1, i));
+ selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 0, i));
waitFor(2000);
- text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 1));
- assertEquals(text, "Here is tab #" + i, format(MSG_USAGE_CONTENT_OF_PANEL_PREFORMATTED, 1));
+ text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 0));
+ assertEquals(text, "Here is tab #" + (i+1), format(MSG_USAGE_CONTENT_OF_PANEL_PREFORMATTED, 1));
}
// test the second tab panel
scrollIntoView(LOC_USAGE_EXAMPLE_HEADER, true);
- selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 2, 3));
+ selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 1, 2));
waitFor(2000);
- text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 2));
+ text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 1));
assertEquals(text, "Here is tab #" + 3, format(MSG_USAGE_CONTENT_OF_PANEL_PREFORMATTED, 2));
-
- selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 2, 1));
+ selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 1, 0));
waitFor(2000);
- text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 2));
+ text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 1));
assertEquals(text, "Here is tab #" + 1, format(MSG_USAGE_CONTENT_OF_PANEL_PREFORMATTED, 2));
// test the disabled tab
boolean isEnabled = true;
try {
- isEnabled = belongsClass("rich-tab-diabled", format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 2, 2));
+ isEnabled = belongsClass("rich-tab-diabled", format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 1, 1));
assertFalse(isEnabled, MSG_USAGE_SECOND_TAB_SHOULD_BE_DISABLED);
} catch (Exception e) {
// OK - there is no class attribute
}
- selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 2, 2));
+ selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 1, 1));
waitFor(2000);
- text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 2));
+ text = selenium.getText(format(LOC_USAGE_PANEL_TEXT_PREFORMATTED, 1));
assertEquals(text, "Here is tab #1", format(MSG_USAGE_CONTENT_OF_PANEL_PREFORMATTED, 2));
// test the third tab panel -- client type work different
scrollIntoView(LOC_USAGE_EXAMPLE_HEADER, true);
- for (int i = 3; i > 0; i--) {
- selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 3, i));
+ for (int i = 2; i >= 0; i--) {
+ selenium.click(format(LOC_USAGE_PANEL_TAB_PREFORMATTED, 2, i));
waitFor(2000);
- for (int j = 1; j < 4; j++) {
+ for (int j = 0; j < 3; j++) {
if (i == j) {
assertTrue(isDisplayed(format(LOC_USAGE_PANEL_3_TEXT_PREFORMATTED, j)));
} else {
@@ -132,17 +131,16 @@
scrollIntoView(LOC_CUST_EXAMPLE_HEADER, true);
String text;
- for (int i = 3; i > 0; i--) {
+ for (int i = 2; i >= 0; i--) {
selenium.click(format(LOC_CUST_PANEL_TAB_PREFORMATTED, i));
waitFor(2000);
- for (int j = 1; j < 4; j++) {
+ for (int j = 0; j < 3; j++) {
if (i == j) {
- waitFor(5000);
assertTrue(isDisplayed(format(LOC_CUST_PANEL_TEXT_PREFORMATTED, j)), format(
- "Tab nr. {0} should be open.", j));
+ "Tab nr. {0} should be open.", j+1));
} else {
assertFalse(isDisplayed(format(LOC_CUST_PANEL_TEXT_PREFORMATTED, j)), format(
- "Tab nr. {0} should not be open.", j));
+ "Tab nr. {0} should not be open.", j+1));
}
}
}
@@ -162,20 +160,20 @@
openTab("Tabs Deletion");
scrollIntoView(LOC_DELET_EXAMPLE_HEADER, true);
- int count = selenium.getXpathCount(LOC_DELET_PANEL_TABS).intValue();
- assertEquals(count - 4, 3, MSG_DELET_NUMBER_OF_TABS);
+ int count = getJQueryCount(LOC_DELET_PANEL_TABS);
+ assertEquals(count, 3, MSG_DELET_NUMBER_OF_TABS);
- for (int i = 3; i > 0; i--) {
- selenium.click(format(LOC_DELET_PANEL_TAB_CLOSE_PREFORMATTED, i));
+ for (int i = 2; i >= 0; i--) {
+ selenium.click(format(LOC_DELET_PANEL_TAB_CLOSE_PREFORMATTED, i+1));
waitFor(2000);
- count = selenium.getXpathCount(LOC_DELET_PANEL_TABS).intValue();
- assertEquals(count / 2, i - 1, MSG_DELET_NUMBER_OF_TABS);
+ count = getJQueryCount(LOC_DELET_PANEL_TABS);
+ assertEquals(count, i, MSG_DELET_NUMBER_OF_TABS);
}
selenium.click(LOC_DELET_RESET_BUTTON);
waitFor(2000);
- count = selenium.getXpathCount(LOC_DELET_PANEL_TABS).intValue();
- assertEquals(count - 4, 3, MSG_DELET_NUMBER_OF_TABS);
+ count = getJQueryCount(LOC_DELET_PANEL_TABS);
+ assertEquals(count, 3, MSG_DELET_NUMBER_OF_TABS);
}
/**
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/toolBar/ToolBarTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/toolBar/ToolBarTestCase.java 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/toolBar/ToolBarTestCase.java 2009-11-04 08:43:52 UTC (rev 15821)
@@ -66,22 +66,22 @@
*/
@Test
public void testFirstToolBar() {
- scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 1), true);
+ scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 0), true);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 1)), MSG_ITEM_CLASS_ATTRIBUTE);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 5)), MSG_ITEM_CLASS_ATTRIBUTE);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 9)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 0)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 4)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_FIRST_TOOLBAR_ITEM_N, 8)), MSG_ITEM_CLASS_ATTRIBUTE);
- String text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 4) + "@align");
+ String text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 3) + "@align");
assertTrue(text.contains("center"), MSG_GROUP_SEPARATOR);
- text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 1) + "/img@src");
+ text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 0) + " > img@src");
assertTrue(text.contains("create_doc.gif"), format(MSG_ITEM_IMAGE_S, "create_doc.gif"));
- text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 2) + "/img@src");
+ text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 1) + " > img@src");
assertTrue(text.contains("create_folder.gif"), format(MSG_ITEM_IMAGE_S, "create_folder.gif"));
- text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 6) + "/img@src");
+ text = selenium.getAttribute(format(LOC_FIRST_TOOLBAR_ITEM_N, 5) + " > img@src");
assertTrue(text.contains("save_as.gif"), format(MSG_ITEM_IMAGE_S, "save_as.gif"));
}
@@ -93,19 +93,19 @@
*/
@Test
public void testSecondToolBar() {
- scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 2), true);
+ scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 1), true);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 1)), MSG_ITEM_CLASS_ATTRIBUTE);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 4)), MSG_ITEM_CLASS_ATTRIBUTE);
- assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 7)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 0)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 3)), MSG_ITEM_CLASS_ATTRIBUTE);
+ assertTrue(belongsClass("rich-toolbar-item", format(LOC_SECOND_TOOLBAR_ITEM_N, 6)), MSG_ITEM_CLASS_ATTRIBUTE);
- String text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 3) + "@align");
+ String text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 2) + "@align");
assertTrue(text.contains("center"), MSG_ITEM_SEPARATOR);
- text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 1) + "/img@src");
+ text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 0) + " > img@src");
assertTrue(text.contains("edit.gif"), format(MSG_ITEM_IMAGE_S, "edit.gif"));
- text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 4) + "/img@src");
+ text = selenium.getAttribute(format(LOC_SECOND_TOOLBAR_ITEM_N, 3) + " > img@src");
assertTrue(text.contains("find.gif"), format(MSG_ITEM_IMAGE_S, "find.gif"));
}
@@ -114,7 +114,7 @@
*/
@Test
public void testThirdToolBarGroupSeparators() {
- scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 3), true);
+ scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 2), true);
// select line
selenium.click(format(LOC_THIRD_TOOLBAR_GROUP_SEPARATOR_N, 1));
@@ -174,7 +174,7 @@
*/
@Test
public void testToolBarItemSeparators() {
- scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 3), true);
+ scrollIntoView(format(LOC_EXAMPLE_N_HEADER, 2), true);
// select line
selenium.click(format(LOC_THIRD_TOOLBAR_ITEM_SEPARATOR_N, 1));
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,17 +1,18 @@
-FIRST_DIVS=//fieldset[1]/div/div[1]/div
-FIRST_HEADER=//fieldset[1]/div/div[1]/div[1]
-SECOND_DIVS=//fieldset[2]/div/div[1]/div
-THIRD_DIVS=//fieldset[3]/div/div[1]/div
-THIRD_HEADER=//fieldset[3]/div/div[1]/div[1]
-THIRD_NESTED_PANELS=//fieldset[3]/div/div[1]/div[2]/table/tbody/tr/td/div[contains(@class, 'rich-panel')]
-LEFT_NESTED_PANEL_LIST_LI=//fieldset[3]//div/div[1]/div[2]/table//td[1]//ul/li
-RIGHT_NESTED_PANEL_LIST_LI=//fieldset[3]//div/div[1]/div[2]/table//td[2]//ul/li
+FIRST_DIVS=jquery=fieldset:eq(0) > div > div:eq(0) > div
+FIRST_HEADER=jquery=fieldset:eq(0) > div > div:eq(0) > div.rich-panel-header
+SECOND_DIVS=jquery=fieldset:eq(1) > div > div:eq(0) > div
+THIRD_DIVS=jquery=fieldset:eq(2) > div > div:eq(0) > div
+THIRD_HEADER=jquery=fieldset:eq(2) div.rich-panel-header.outpanelHeader
+THIRD_NESTED_PANELS=jquery=fieldset:eq(2) div.rich-panel-body div.rich-panel
+LEFT_NESTED_PANEL_LIST_LI=jquery=fieldset:eq(2) div.rich-panel-body div.rich-panel:eq(0) li
+RIGHT_NESTED_PANEL_LIST_LI=jquery=fieldset:eq(2) div.rich-panel-body div.rich-panel:eq(1) li
# second tab
-CUST_FIRST_PANEL_HEADER=//table[contains(@class, 'rich-tabpanel-content-position')]//table[1]//td[1]/div/div[1]
-CUST_SECOND_PANEL_HEADER=//table[contains(@class, 'rich-tabpanel-content-position')]//table[1]//td[2]/div/div[1]
-CUST_THIRD_PANEL_HEADER=//table[contains(@class, 'rich-tabpanel-content-position')]//table[2]//td[1]/div/div[1]
-CUST_THIRD_PANEL_BODY=//table[contains(@class, 'rich-tabpanel-content-position')]//table[2]//td[1]/div/div[2]
-CUST_FOURTH_PANEL_BODY=//table[contains(@class, 'rich-tabpanel-content-position')]//table[2]//td[2]/div/div[2]
-CUST_FOURTH_PANEL_HEADER=//table[contains(@class, 'rich-tabpanel-content-position')]//table[2]//td[2]/div/div[1]
-CUST_FIFTH_PANEL_PARTS=//table[contains(@class, 'rich-tabpanel-content-position')]//table[2]//td[3]/div/div
\ No newline at end of file
+CUST_FIRST_PANEL_HEADER=jquery=td.rich-tabpanel-content table:eq(0) td:eq(0) div.rich-panel-header
+CUST_SECOND_PANEL_HEADER=jquery=td.rich-tabpanel-content table:eq(0) td:eq(1) div.rich-panel-header
+CUST_THIRD_PANEL_HEADER=jquery=td.rich-tabpanel-content table:eq(1) td:eq(0) div.rich-panel-header
+CUST_THIRD_PANEL_BODY=jquery=td.rich-tabpanel-content table:eq(1) td:eq(0) div.rich-panel-body
+CUST_FOURTH_PANEL_BODY=jquery=td.rich-tabpanel-content table:eq(1) td:eq(1) div.rich-panel-body
+CUST_FOURTH_PANEL_HEADER=jquery=td.rich-tabpanel-content table:eq(1) td:eq(1) div.rich-panel-header
+CUST_FIFTH_PANEL_BODY=jquery=td.rich-tabpanel-content table:eq(1) td:eq(2) div.rich-panel-body
+CUST_FIFTH_PANEL_HEADER=jquery=td.rich-tabpanel-content table:eq(1) td:eq(2) div.rich-panel-header
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/messages.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panel/messages.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -16,4 +16,3 @@
CUST_THIRD_CLASS_2=body3
CUST_FOURTH_HEADER=Scrolling Text Panel
CUST_FOURTH_CLASS=body3
-CUST_FIFTH_COUNT=1
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelBar/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelBar/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelBar/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,7 +1,7 @@
-EXAMPLE_HEADER=//fieldset/legend
-HEADER_1_N=//fieldset/div/div[1]/div[{0}]/div[1]
-HEADER_2_N=//fieldset/div/div[1]/div[{0}]/div[2]
-CONTENT_N=//fieldset/div/div[1]/div[{0}]/div[3]
+EXAMPLE_HEADER=jquery=fieldset > legend
+HEADER_1_N=jquery=fieldset div.rich-panelbar-header-act:eq({0})
+HEADER_2_N=jquery=fieldset div.rich-panelbar-header:eq({0})
+CONTENT_N=jquery=fieldset div.rich-panelbar-content-exterior:eq({0})
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,18 +1,18 @@
-EXAMPLE_HEADER=//fieldset/legend
-PANEL=//span[@id='form:current']
+EXAMPLE_HEADER=jquery=fieldset > legend
+PANEL=jquery=fieldset span[id=form\\:current]
-GROUP_N_IMAGE_BEFORE=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/table/tbody/tr/td[1]/img@src
-GROUP_N_IMAGE_AFTER=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/table/tbody/tr/td[3]/img@src
-GROUP_N_TEXT=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/table/tbody/tr/td[2]
+GROUP_N_IMAGE_BEFORE=jquery=fieldset table.rich-pmenu-top-group:eq({0}) td:eq(0) img@src
+GROUP_N_IMAGE_AFTER=jquery=fieldset table.rich-pmenu-top-group:eq({0}) td:eq(2) img@src
+GROUP_N_TEXT=jquery=fieldset table.rich-pmenu-top-group:eq({0}) td:eq(1)
-ITEM_M_N_IMAGE_BEFORE=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/div[{1}]/table/tbody/tr/td[1]/img[2]@src
-ITEM_M_N_IMAGE_AFTER=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/div[{1}]/table/tbody/tr/td[3]/img@src
-ITEM_M_N_TEXT=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/div[{1}]/table/tbody/tr/td[2]
-ITEM_M_N_STYLE=//form[@id='form']/table/tbody/tr/td[1]/div/div[{0}]/div[{1}]
+ITEM_M_N_IMAGE_BEFORE=jquery=fieldset div.rich-pmenu-top-group-div:eq({0}) div:eq({1}) td:eq(0) img:eq(1)@src
+ITEM_M_N_IMAGE_AFTER=jquery=fieldset div.rich-pmenu-top-group-div:eq({0}) div:eq({1}) td:eq(2) img@src
+ITEM_M_N_TEXT=jquery=fieldset div.rich-pmenu-top-group-div:eq({0}) div:eq({1}) td:eq(1)
+ITEM_M_N_STYLE=jquery=fieldset div.rich-pmenu-top-group-div:eq({0}) div:eq({1})
-SUBITEM_M_IMAGE=//fieldset//div[contains(@class,'rich-pmenu')]/div[2]/div[4]/div[{0}]/table/tbody/tr/td[1]/img[3]@src
-SUBITEM_M_TEXT=//fieldset//div[contains(@class,'rich-pmenu')]/div[2]/div[4]/div[{0}]/table/tbody/tr/td[2]
-SUBITEM_M_STYLE=//fieldset//div[contains(@class,'rich-pmenu')]/div[2]/div[4]/div[{0}]
+SUBITEM_M_IMAGE=jquery=fieldset div.rich-pmenu-top-group-div:eq(1) div:eq(3) div:eq({0}) td.rich-pmenu-item-icon > img:eq(2)@src
+SUBITEM_M_TEXT=jquery=fieldset div.rich-pmenu-top-group-div:eq(1) div:eq(3) div:eq({0}) td.rich-pmenu-item-label
+SUBITEM_M_STYLE=jquery=fieldset div.rich-pmenu-top-group-div:eq(1) div:eq(3) div:eq({0})
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/messages.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/panelMenu/messages.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -6,11 +6,11 @@
IMAGE_AFTER_GROUP_NAME_DOWN=There should be arrows down right of group name.
IMAGE_AFTER_GROUP_NAME_UP=There should be arrows up right of group name.
IMAGE_AFTER_GROUP_NAME_SPACER=There should be spacer right of group name.
-ITEM_M_N_NOT_VISIBLE=Item %d.%d should not be visible.
-ITEM_M_N_VISIBLE=Item %d.%d should be visible.
+ITEM_M_N_NOT_VISIBLE=Item {0}.{1} should not be visible.
+ITEM_M_N_VISIBLE=Item {0}.{1} should be visible.
IMAGE_BEFORE_ITEM_GRID=There should be an image with grid left of item name.
-SUBITEM_M_NOT_VISIBLE=Item 2.4.%d should not be visible.
-SUBITEM_M_VISIBLE=Item 2.4.%d should be visible.
+SUBITEM_M_NOT_VISIBLE=Item 2.4.{0} should not be visible.
+SUBITEM_M_VISIBLE=Item 2.4.{0} should be visible.
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/progressBar/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,13 +1,13 @@
-EXAMPLE_1_HEADER=//fieldset[1]/legend
-EXAMPLE_2_HEADER=//fieldset[2]/legend
+EXAMPLE_1_HEADER=jquery=fieldset:eq(0) > legend
+EXAMPLE_2_HEADER=jquery=fieldset:eq(0) > legend
-FIRST_BUTTON=//fieldset[1]/div/form/span/div/input
-FIRST_PROGRESS_BAR_STYLE=//fieldset[1]/div/form/span/div/div[2]
+FIRST_BUTTON=jquery=fieldset:eq(0) input[value=Start Process]
+FIRST_PROGRESS_BAR_STYLE=jquery=fieldset:eq(0) div[id$=upload]
-SECOND_BUTTON=//button[@id='button']
-SECOND_LABEL_FINISHED=//fieldset[2]/div/form/div/div[3]
-SECOND_LABEL_INITIAL=//fieldset[2]/div/form/div/div[1]
-SECOND_PROGRESS_BAR_STYLE=//fieldset[2]/div/form/div/div[2]/div
+SECOND_BUTTON=jquery=fieldset:eq(1) button
+SECOND_LABEL_FINISHED=jquery=fieldset:eq(1) div[id=form\\:progressBar\\:completeState]
+SECOND_LABEL_INITIAL=jquery=fieldset:eq(1) div[id=form\\:progressBar\\:initialState]
+SECOND_PROGRESS_BAR_STYLE=jquery=fieldset:eq(1) div[id=form\\:progressBar\\:upload]
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/separator/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,5 +1,5 @@
-EXAMPLE_HEADER=//fieldset/legend
-SEPARATOR_N=//fieldset/div/div[{0}]/div
+EXAMPLE_HEADER=jquery=fieldset > legend
+SEPARATOR_N=jquery=fieldset > div div.rich-separator:eq({0})
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/simpleTogglePanel/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/simpleTogglePanel/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/simpleTogglePanel/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,12 +1,12 @@
-EXAMPLE_1_HEADER=//fieldset[1]/legend
-EXAMPLE_2_HEADER=//fieldset[2]/legend
+EXAMPLE_1_HEADER=jquery=fieldset:eq(0) > legend
+EXAMPLE_2_HEADER=jquery=fieldset:eq(1) > legend
-FIRST_EXAMPLE_HEADER=//fieldset[1]//form/div
-FIRST_EXAMPLE_ARROWS_LEFT=//fieldset[1]//div[@class='rich-stglpnl-marker' and contains(@id,'switch_on')]
-FIRST_EXAMPLE_ARROWS_RIGHT=//fieldset[1]//div[@class='rich-stglpnl-marker' and contains(@id,'switch_off')]
-FIRST_EXAMPLE_BODY=//fieldset[1]/div/div[1]/div
+FIRST_EXAMPLE_HEADER=jquery=fieldset:eq(0) form > div
+FIRST_EXAMPLE_ARROWS_LEFT=jquery=fieldset:eq(0) div[id$=switch_on]
+FIRST_EXAMPLE_ARROWS_RIGHT=jquery=fieldset:eq(0) div[id$=switch_off]
+FIRST_EXAMPLE_BODY=jquery=fieldset:eq(0) div.rich-stglpanel-body
-SECOND_EXAMPLE_N_HEADER=//fieldset[2]//td[{0}]/div/div[1]
-SECOND_EXAMPLE_N_ARROWS_LEFT=//fieldset[2]//td[{0}]//div[@class\='rich-stglpnl-marker' and contains(@id,'switch_on')]
-SECOND_EXAMPLE_N_ARROWS_RIGHT=//fieldset[2]//td[{0}]//div[@class\='rich-stglpnl-marker' and contains(@id,'switch_off')]
-SECOND_EXAMPLE_N_BODY=//fieldset[2]//td[{0}]/div/div[contains(@class, 'rich-stglpanel-body')]
+SECOND_EXAMPLE_N_HEADER=jquery=fieldset:eq(1) td:eq({0}) > div > div:eq(0)
+SECOND_EXAMPLE_N_ARROWS_LEFT=jquery=fieldset:eq(1) td:eq({0}) div[id$=switch_on]
+SECOND_EXAMPLE_N_ARROWS_RIGHT=jquery=fieldset:eq(1) td:eq({0}) div[id$=switch_off]
+SECOND_EXAMPLE_N_BODY=jquery=fieldset:eq(1) td:eq({0}) div[id$=body]
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spacer/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spacer/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spacer/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,6 +1,6 @@
-EXAMPLE_HEADER=//fieldset[1]/legend
-FIRST_SPACER_HEIGHT=//fieldset/div/p[1]/img@height
-FIRST_SPACER_WIDTH=//fieldset/div/p[1]/img@width
-SECOND_SPACER_HEIGHT=//fieldset/div/img@height
-SECOND_SPACER_WIDTH=//fieldset/div/img@width
+EXAMPLE_HEADER=jquery=fieldset > legend
+FIRST_SPACER_HEIGHT=jquery=fieldset img.rich-spacer:eq(0)@height
+FIRST_SPACER_WIDTH=jquery=fieldset img.rich-spacer:eq(0)@width
+SECOND_SPACER_HEIGHT=jquery=fieldset img.rich-spacer:eq(1)@height
+SECOND_SPACER_WIDTH=jquery=fieldset img.rich-spacer:eq(1)@width
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tabPanel/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tabPanel/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tabPanel/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,17 +1,17 @@
# first tab
-USAGE_EXAMPLE_HEADER=//fieldset/legend
-USAGE_PANEL_TEXT_PREFORMATTED=//fieldset/div/table[{0}]/tbody/tr[2]/td/table/tbody/tr/td
-USAGE_PANEL_3_TEXT_PREFORMATTED=//fieldset/div/table[3]/tbody/tr[2]/td[{0}]
-USAGE_PANEL_TAB_PREFORMATTED=//fieldset/div/table[{0}]/tbody/tr[1]/td/form/table/tbody/tr/td[{1}*2]/table
+USAGE_EXAMPLE_HEADER=jquery=fieldset > legend
+USAGE_PANEL_TEXT_PREFORMATTED=jquery=fieldset > div > table:eq({0}) > tbody > tr:eq(1)
+USAGE_PANEL_3_TEXT_PREFORMATTED=jquery=fieldset > div > table:eq(2) td:has(table.rich-tabpanel-content-position):eq({0})
+USAGE_PANEL_TAB_PREFORMATTED=jquery=fieldset > div > table:eq({0}) td[id$=lbl]:eq({1})
# second tab
-CUST_EXAMPLE_HEADER=//div[@id='itme']/p
-CUST_TABS_ALIGN=//div[@id='itme']//table[contains(@class,'rich-tabpanel')]/tbody/tr[1]/td@align
-CUST_PANEL_TEXT_PREFORMATTED=//div[@id='itme']//table[contains(@class,'rich-tabpanel')]/tbody/tr[2]/td[{0}]
-CUST_PANEL_TAB_PREFORMATTED=//div[@id='itme']//table[contains(@class,'rich-tabpanel')]/tbody/tr[1]/td/form/table/tbody/tr/td[{0}*2]/table
+CUST_EXAMPLE_HEADER=jquery=div#itme > p
+CUST_TABS_ALIGN=jquery=div#itme > table.rich-tabpanel td.rich-tab-bottom-line@align
+CUST_PANEL_TEXT_PREFORMATTED=jquery=div#itme > table.rich-tabpanel > tbody > tr:eq(1) > td:eq({0})
+CUST_PANEL_TAB_PREFORMATTED=jquery=div#itme > table.rich-tabpanel > tbody form td[id$=cell]:eq({0}) > table
# third tab
-DELET_EXAMPLE_HEADER=//form[@id='tabs_form']/../../p
-DELET_PANEL_TABS=//table[@id='tabs_form:RemoveAbleTabPanel']/tbody/tr[1]/td/table/tbody/tr/td
-DELET_PANEL_TAB_CLOSE_PREFORMATTED=//img[@id='tabs_form:hidelink{0}']
-DELET_RESET_BUTTON=//form[@id\='tabs_form']/input[2]
\ No newline at end of file
+DELET_EXAMPLE_HEADER=jquery=td.content_tab
+DELET_PANEL_TABS=jquery=table[id$=RemoveAbleTabPanel] td[id$=cell]
+DELET_PANEL_TAB_CLOSE_PREFORMATTED=jquery=img[id=tabs_form\:hidelink{0}]
+DELET_RESET_BUTTON=jquery=input[value=Reset Tabs]
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/togglePanel/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/togglePanel/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/togglePanel/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,8 +1,8 @@
-EXAMPLE_HEADER=//fieldset[1]/legend
-CLICK_ME_BUTTON=//fieldset[1]/div/div[1]/div[1]
-CLICK_ME_BUTTON_A=//fieldset[1]/div/div[1]/div[1]/a
-CLOSE_BUTTON=//fieldset[1]//div[contains(@class,'rich-toggle-panel')]//div[contains(@id,'tip1')]//a[text()\='x Close']
-PANEL_PREFORMATTED=//fieldset[1]//div[contains(@class,'rich-toggle-panel')]//div[contains(@id,'tip{0}')]
-PREVIOUS_BUTTON_PREFORMATTED=//fieldset[1]//div[contains(@class,'rich-toggle-panel')]//div[contains(@id,'tip{0}')]//a[text()\='\u00AB Previous']
-NEXT_BUTTON_PREFORMATTED=//fieldset[1]//div[contains(@class,'rich-toggle-panel')]//div[contains(@id,'tip{0}')]//a[text()\='Next \u00BB']
+EXAMPLE_HEADER=jquery=fieldset > legend
+CLICK_ME_BUTTON=jquery=fieldset div[id$=closed]
+CLICK_ME_BUTTON_A=jquery=fieldset div[id$=closed] > a
+CLOSE_BUTTON=jquery=fieldset div[id$=tip1] td.col td:eq(0) > a
+PANEL_PREFORMATTED=jquery=fieldset div[id$=tip{0}]
+PREVIOUS_BUTTON_PREFORMATTED=jquery=fieldset div[id$=tip{0}] td.col td:eq(1) > a
+NEXT_BUTTON_PREFORMATTED=jquery=fieldset div[id$=tip{0}] td.col td:eq(2) > a
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/toolBar/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/toolBar/locators.properties 2009-11-04 08:36:06 UTC (rev 15820)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/toolBar/locators.properties 2009-11-04 08:43:52 UTC (rev 15821)
@@ -1,7 +1,7 @@
-EXAMPLE_N_HEADER=//fieldset[{0}]/legend
-FIRST_TOOLBAR_ITEM_N=//fieldset[1]//td[{0}]
-SECOND_TOOLBAR_ITEM_N=//fieldset[2]//td[{0}]
-THIRD_TOOLBAR_GROUP_SEPARATOR_N=//fieldset[3]//form/table/tbody/tr/td[1]//td[1+{0}]/a
-THIRD_TOOLBAR_ITEM_SEPARATOR_N=//fieldset[3]//form/table/tbody/tr/td[3]//td[1+{0}]/a
-GROUP_SEPARATOR_IMG=//table[@id='bar']/tbody/tr/td[4]/img
-ITEM_SEPARATOR_IMG=//table[@id='bar']/tbody/tr/td[2]/img
+EXAMPLE_N_HEADER=jquery=fieldset:eq({0}) > legend
+FIRST_TOOLBAR_ITEM_N=jquery=fieldset:eq(0) td:eq({0})
+SECOND_TOOLBAR_ITEM_N=jquery=fieldset:eq(1) td:eq({0})
+THIRD_TOOLBAR_GROUP_SEPARATOR_N=jquery=fieldset:eq(2) div.rich-panel:eq(0) td:eq({0}) > a
+THIRD_TOOLBAR_ITEM_SEPARATOR_N=jquery=fieldset:eq(2) div.rich-panel:eq(1) td:eq({0}) > a
+GROUP_SEPARATOR_IMG=jquery=fieldset:eq(2) table#bar td:eq(3) > img
+ITEM_SEPARATOR_IMG=jquery=fieldset:eq(2) table#bar td:eq(1) > img
15 years, 1 month
JBoss Rich Faces SVN: r15820 - in root/docs/trunk/Component_Reference/en-US: fallback_content and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-11-04 03:36:06 -0500 (Wed, 04 Nov 2009)
New Revision: 15820
Modified:
root/docs/trunk/Component_Reference/en-US/Book_Info.xml
root/docs/trunk/Component_Reference/en-US/Common_Ajax_attributes.xml
root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/Preface.xml
root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml
root/docs/trunk/Component_Reference/en-US/all-Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/fallback_content/Conventions.xml
root/docs/trunk/Component_Reference/en-US/fallback_content/Feedback.xml
root/docs/trunk/Component_Reference/en-US/fallback_content/Legal_Notice.xml
Log:
Fixed validation errors and built all-in-one xml
Modified: root/docs/trunk/Component_Reference/en-US/Book_Info.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/Book_Info.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -13,28 +13,23 @@
<abstract>
<para>This book details each component in the RichFaces &VERSION;
framework, including examples of their use in applications.</para></abstract>
- <corpauthor>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="./images/rf_logo.png" format="PNG" scalefit="1" />
- </imageobject>
- <textobject>
- <phrase>Logo</phrase>
- </textobject>
- </inlinemediaobject>
- </corpauthor>
- <copyright>
- <year>&YEAR;</year>
- <holder>&HOLDER;</holder>
- </copyright>
-
- <!--FOR PUBLICAN -->
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Legal_Notice.xml">
- <!--FOR JDOCBOOK:-->
- <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
- </xi:include>
- <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-</bookinfo>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="./images/rf_logo.png" format="PNG" scalefit="1" />
+ </imageobject>
+ <textobject>
+ <phrase>Logo</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <copyright>
+ <year>&YEAR;</year>
+ <holder>&HOLDER;</holder>
+ </copyright>
+ <!-- FOR PUBLICAN --><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK: --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ </xi:fallback>
+ </xi:include>
+ <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ </bookinfo>
Modified: root/docs/trunk/Component_Reference/en-US/Common_Ajax_attributes.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Common_Ajax_attributes.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/Common_Ajax_attributes.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -67,7 +67,7 @@
A component with <code>limitRender="true"</code> specified will <emphasis>not</emphasis> cause components with <code>ajaxRendered="true"</code> to re-render, and only those components listed in the <code>render</code> attribute will be updated. This essentially overrides the <code>ajaxRendered</code> attribute in other components.
</para>
<para>
- <xref linkend="exam-Component_Reference-limitRender-Rendering_example" /> describes two command buttons, a panel grid rendered by the buttons, and an output panel showing error messages. When the first button is clicked, the output panel is rendered even though it is not explicitly referenced with the <code>render</code> attribute. The second button, however, uses <code>limitRender="true"</code> to override the output panel's rendering and only render the panel grid.
+ <xref linkend="exam-Component_Reference-data-Data_reference_example" /> describes two command buttons, a panel grid rendered by the buttons, and an output panel showing error messages. When the first button is clicked, the output panel is rendered even though it is not explicitly referenced with the <code>render</code> attribute. The second button, however, uses <code>limitRender="true"</code> to override the output panel's rendering and only render the panel grid.
</para>
<example id="exam-Component_Reference-limitRender-Rendering_example">
<title>Rendering example</title>
@@ -99,27 +99,30 @@
The <code>queue</code> attribute defines the name of the queue that will be used to schedule upcoming Ajax requests. Typically RichFaces does not queue Ajax requests, so if events are produced simultaneously they will arrive at the server simultaneously. This can potentially lead to unpredictable results when the responses are returned. The <code>queue</code> attribute ensures that the requests are responded to in a set order.
</para>
<para>
- A queue name is specified with the <code>queue</code> attribute, and each request added to the named queue is completed one at a time in the order they were sent. In addition, RichFaces intelligently removes similar requests produced by the same event from a queue to improve performance, protecting against unnecessary traffic flooding and
+ A queue name is specified with the <code>queue</code> attribute, and each request added to the named queue is completed one at a time in the order they were sent. In addition, RichFaces intelligently removes similar requests produced by the same event from a queue to improve performance, protecting against unnecessary traffic flooding and
</para>
</section>
- <section>
+
+ <section id="sect-Component_Reference-Queuing_and_traffic_control-requestDelay">
<title>requestDelay</title>
<para>
The <code>requestDelay</code> attribute specifies an amount of time in milliseconds for the request to wait in the queue before being sent to the server. If a similar request is added to the queue before the delay is over, the original request is removed from the queue and not sent.
</para>
</section>
- <section>
+
+ <section id="sect-Component_Reference-Queuing_and_traffic_control-ignoreDupResponses">
<title>ignoreDupResponses</title>
<para>
When set to <literal>true</literal>, the <code>ignoreDupResponses</code> attribute causes responses from the server for the request to be ignored if there is another similar request in the queue. This avoids unnecessary updates on the client when another update is expected. The request is still processed on the server, but if another similar request has been queued then no updates are made on the client.
</para>
</section>
+
</section>
<section id="sect-Component_Reference-Common_Ajax_attributes-Data_processing">
<title>Data processing</title>
<para>
- RichFaces uses a form-based approach for sending Ajax requests. As such, each time a request is sent the data from the requesting component's parent <acronym>JSF</acronym> form is submitted along with the <acronym>XMLHTTPRequest</acronym> object. The form data contains values from the input element and auxiliary information such as state-saving data.
+ RichFaces uses a form-based approach for sending Ajax requests. As such, each time a request is sent the data from the requesting component's parent <acronym>JSF</acronym> form is submitted along with the <acronym>XMLHTTPRequest</acronym> object. The form data contains values from the input element and auxiliary information such as state-saving data.
</para>
<section id="sect-Component_Reference-Data_processing-process">
<title>process</title>
@@ -162,7 +165,7 @@
<section id="sect-Component_Reference-Action_and_navigation-actionListener">
<title>actionListener</title>
<para>
- The <code>actionListener</code> attribute is a method binding for <classname>ActionEvent</classname> methods with a return type of <literal>void</literal>.
+ The <code>actionListener</code> attribute is a method binding for <classname>ActionEvent</classname> methods with a return type of <literal>void</literal>.
</para>
</section>
@@ -183,7 +186,7 @@
<section id="sect-Component_Reference-Events_and_JavaScript_interactions-onclick">
<title>onclick</title>
<para>
- The <code>onclick</click> attribute functions similarly to the <code>onsubmit</code> attribute for those components that can be clicked, such as <classname><a4j:commandButton></classname> and <classname><a4j:commandLink></classname>. It invokes the defined JavaScript before the Ajax request, and the request will be canceled if the defined code returns <literal>false</literal>.
+ The <code>onclick</code> attribute functions similarly to the <code>onsubmit</code> attribute for those components that can be clicked, such as <classname><a4j:commandButton></classname> and <classname><a4j:commandLink></classname>. It invokes the defined JavaScript before the Ajax request, and the request will be canceled if the defined code returns <literal>false</literal>.
</para>
</section>
@@ -220,14 +223,13 @@
<para>
The <code>data</code> attribute allows the use of additional data during an Ajax call. <acronym>JSF</acronym> Expression Language (<acronym>EL</acronym>) can be used to reference the property of the managed bean, and its value will be serialized in JavaScript Object Notation (<acronym>JSON</acronym>) and returned to the client side. The property can then be referenced through the <code>data</code> variable in the event attribute definitions. Both primitive types and complex types such as arrays and collections can be serialized and used with <code>data</code>.
</para>
- <example id="exam-Component_Reference-limitRender-Rendering_example">
+ <example id="exam-Component_Reference-data-Data_reference_example">
<title>Data reference example</title>
<programlisting language="XML">
<a4j:commandButton value="Update" data="#{userBean.name}" oncomplete="showTheName(data.name)" />
</programlisting>
</example>
-
</section>
</section>
Modified: root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -4,7 +4,7 @@
<book status="draft">
<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- <!-- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> --><xi:include href="Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ <!-- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> --><xi:include href="Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Common_Ajax_attributes.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Rich_inputs.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Panels_and_containers.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
Modified: root/docs/trunk/Component_Reference/en-US/Preface.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/Preface.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -4,23 +4,13 @@
<preface id="pref-Component_Reference-Preface">
<title>Preface</title>
- <!--FOR JDOCBOOK-->
- <xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
- <!--FOR PUBLICAN-->
- <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
+ <!-- FOR JDOCBOOK --><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR PUBLICAN --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ </xi:fallback>
</xi:include>
-
- <!--PUBLICAN'S ORIGINAL XINCLUDES-->
- <xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
- <!--FOR JDOCBOOK-->
- <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
- </xi:include>
- </xi:fallback>
+ <!-- PUBLICAN'S ORIGINAL XINCLUDES --><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ </xi:fallback>
</xi:include>
+ </xi:fallback>
+ </xi:include>
</preface>
+
Modified: root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -22,7 +22,7 @@
The position at which the pop-up calendar displays relative to the text field and button can be configured using the <code>jointPoint</code> and <code>direction</code> attributes. The <code>jointPoint</code> attribute refers to the corner of the text field and button with which the calendar will be aligned and the <code>direction</code> specifies which direction the pop-up calendar will span relative to the joint point. The default settings are <code>jointPoint="bottom-left"</code> and <code>direction="bottom-right"</code>, causing the pop-up calendar to align with the bottom-left corner of the text field and span to the bottom-right, underneath the text field and button. The diagram shows the joint points and directions that can be used. Alternatively, both <code>jointPoint</code> and <code>direction</code> can be set to <literal>auto</literal> to allow smart pop-up positioning.
</para>
<para>
- The calendar features a <guibutton>Today</guibutton> button for locating today's date on the calendar. This can be set to three different values using the <code>todayControlMode</code> attribute:
+ The calendar features a <guibutton>Today</guibutton> button for locating today's date on the calendar. This can be set to three different values using the <code>todayControlMode</code> attribute:
</para>
<itemizedlist>
<listitem>
@@ -32,12 +32,12 @@
</listitem>
<listitem>
<para>
- <literal>select</literal>, the default setting, which scrolls the calendar to the current month and selects today's date; and
+ <literal>select</literal>, the default setting, which scrolls the calendar to the current month and selects today's date; and
</para>
</listitem>
<listitem>
<para>
- <literal>scroll</literal>, which scrolls the calendar to the current month but does not select today's date.
+ <literal>scroll</literal>, which scrolls the calendar to the current month but does not select today's date.
</para>
</listitem>
</itemizedlist>
@@ -82,7 +82,6 @@
<para>
The entire calendar can be set as read-only with <code>readonly="true"</code>. This allows months and years to be browsed through with the arrow controls, but dates and times cannot be selected.
</para>
-
</section>
<section id="sect-Component_Reference-Rich_inputs-richcolorPicker">
@@ -94,7 +93,7 @@
The <code>value</code> attribute stores the currently selected color. The <code>colorMode</code> attribute defines whether the <code>value</code> is saved as <literal>hex</literal> (hexadecimal) or <literal>rgb</literal> (red-green-blue).
</para>
<para>
- The <classname><rich:colorPicker></classname> appears in-line by default, where the color picker spectrum is only shown once the component is clicked on. The component can appear "flat", where the whole color picker is shown, by setting <code>flat="true"</code>.
+ The <classname><rich:colorPicker></classname> appears in-line by default, where the color picker spectrum is only shown once the component is clicked on. The component can appear "flat", where the whole color picker is shown, by setting <code>flat="true"</code>.
</para>
<para>
The <classname><rich:colorPicker></classname> component has the unique event handler <code>onbeforeshow</code>, which is triggered immediately before the color picker is opened. The <code>showEvent</code> attribute can be used to bind the opening of the color picker to a specific event; it is bound to the <code>onclick</code> event by default.
@@ -115,18 +114,20 @@
Using the <code>suggestionValues</code> attribute, and defining a collection of suggestions:
</para>
<example>
- <programlisting language="XML">
+ <title>Defining suggestion values</title>
+<programlisting language="XML">
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}"
- </programlisting>
+</programlisting>
</example>
</listitem>
<listitem>
<para>
Using the JSF components <classname><f:selectItem /></classname> and <classname><f:selectItems /></classname> to define a list of items:
</para>
- <example>
+ <example id="exam-Component_Reference-richcomboBox-Defining_list_items_for_richinplaceSelect">
<title>Defining list items for <rich:inplaceSelect></title>
- <programlisting language="XML">
+
+<programlisting language="XML">
<rich:comboBox value="#{bean.item}" valueChangeListener="#{bean.selectionChanged}" >
<f:selectItems value="#{bean.selectItems}" />
<f.selectItem itemValue="Item 1" />
@@ -134,22 +135,26 @@
<f.selectItem itemValue="Item 3" />
<f.selectItem itemValue="Item 4" />
</rich:comboBox>
- </programlisting>
+</programlisting>
</example>
</listitem>
</itemizedlist>
<para>
- Users can type into the combo-box's text field to enter a value, which also searches through the suggestion items in the drop-down box. By default, the first suggestion item is selected as the user types. This behavior can be deactivated by setting <code>selectFirstOnUpdate="false"</code>. Setting <code>directInputSuggestions="true"</code> causes the combo-box to fill the text field box with a matching suggestion as the user types. Alternatively, the text field can be disabled by setting <code>enableManualInput="false"</code>, which forces the users to pick from items in the drop-down box.
+ Users can type into the combo-box's text field to enter a value, which also searches through the suggestion items in the drop-down box. By default, the first suggestion item is selected as the user types. This behavior can be deactivated by setting <code>selectFirstOnUpdate="false"</code>. Setting <code>directInputSuggestions="true"</code> causes the combo-box to fill the text field box with a matching suggestion as the user types. Alternatively, the text field can be disabled by setting <code>enableManualInput="false"</code>, which forces the users to pick from items in the drop-down box.
</para>
<para>
The <classname><rich:comboBox></classname> component has two unique event handlers:
</para>
<itemizedlist>
<listitem>
- <code>onlistcall</code> triggers before the drop-down list is shown, allowing the operation to be canceled.
+ <para>
+ <code>onlistcall</code> triggers before the drop-down list is shown, allowing the operation to be canceled.
+ </para>
</listitem>
<listitem>
- <code>onselect</code> triggers when a suggestion is selected from the drop-down list, before the update request is sent.
+ <para>
+ <code>onselect</code> triggers when a suggestion is selected from the drop-down list, before the update request is sent.
+ </para>
</listitem>
</itemizedlist>
</section>
@@ -157,7 +162,7 @@
<section id="sect-Component_Reference-Rich_inputs-richeditor">
<title><rich:editor></title>
<para>
- The <classname><rich:editor></classname> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
+ The <classname><rich:editor></classname> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
</para>
</section>
@@ -173,9 +178,10 @@
Basic usage requires the <code>uploadData</code> attribute, pointing to the collection of uploaded files.
</para>
<example>
- <programlisting language="XML">
+ <title>Basic usage of <rich:fileUpload></title>
+<programlisting language="XML">
<rich:fileUpload uploadData="#{bean.data}" />
- </programlisting>
+</programlisting>
</example>
<para>
The <code>fileUploadListener</code> attribute can be used to call a function on the server side after each file is uploaded.
@@ -252,7 +258,8 @@
<para>
Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component.
</para>
- <para>By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the existing text can be automatically highlighted to make editing easier by setting <code>selectOnEdit="true"</code>.
+ <para>
+ By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the existing text can be automatically highlighted to make editing easier by setting <code>selectOnEdit="true"</code>.
</para>
<para>
The user can confirm and save their input by pressing the <keycap>Enter</keycap> key or cancel by pressing the <keycap>Esc</keycap> key. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
@@ -295,9 +302,10 @@
<para>
Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component and a list of items. The list of items can be defined using the JSF components <classname><f:selectItem/></classname> and <classname><f:selectItems/></classname>.
</para>
- <example>
+ <example id="exam-Component_Reference-richinplaceSelect-Defining_list_items_for_richinplaceSelect">
<title>Defining list items for <rich:inplaceSelect></title>
- <programlisting language="XML">
+
+<programlisting language="XML">
<rich:inplaceSelect value="#{bean.inputValue}" defaultLabel="click to edit" >
<f:selectItems value="#{bean.selectItems}" />
<f.selectItem itemValue="1" itemLabel="Item 1" />
@@ -305,9 +313,10 @@
<f.selectItem itemValue="3" itemLabel="Item 3" />
<f.selectItem itemValue="4" itemLabel="Item 4" />
</rich:comboBox>
- </programlisting>
+</programlisting>
</example>
- <para>By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the drop-down list of possible values will automatically be displayed; this can be deactivated by setting <code>openOnEdit="false"</code>.
+ <para>
+ By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the drop-down list of possible values will automatically be displayed; this can be deactivated by setting <code>openOnEdit="false"</code>.
</para>
<para>
Once the user selects an option from the drop-down list, the item becomes the new value for the component and the state is switched to the "changed" state. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
@@ -338,12 +347,11 @@
</listitem>
</itemizedlist>
</section>
- </section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSlider">
<title><rich:inputNumberSlider></title>
<para>
- The <classname><rich:inputNumberSlider></classname> component provides a slider for changing numerical values. Optional features include a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
+ The <classname><rich:inputNumberSlider></classname> component provides a slider for changing numerical values. Optional features include a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
</para>
<para>
Basic use of the component with no attributes specified will render a slider with a minimum value of 0, a maximum of 100, and a gradient step of 1, together with a text field for typing the desired numerical value. The text field can be removed by setting <code>showInput="false"</code>, and the properties of the slider can be set with the attributes <code>minValue</code>, <code>maxValue</code>, and <code>step</code>. The slider is labeled with the minimum and maximum boundary values, and a tool-tip showing the current value is shown while sliding the slider; these items can be turned off by setting <code>showBoundaryValues="false"</code> and <code>showToolTip="false"</code> respectively.
@@ -387,9 +395,8 @@
The <code>minChars</code> attribute can be used to limit sending the Ajax request until a certain amount of characters has been entered. If the query returns no results, an appropriate message to display can be set with the <code>nothingLabel</code> attribute.
</para>
<para>
- Instead of returning just one value from an object, the entire object can be returned to the client and handled appropriately. This is done by specifying <code>usingSuggestObjects="true"</code> and setting the <code>onobjectchange</code> attribute to a JavaScript method to handle the object, passing the <object>suggestion</object> object as a parameter.
+ Instead of returning just one value from an object, the entire object can be returned to the client and handled appropriately. This is done by specifying <code>usingSuggestObjects="true"</code> and setting the <code>onobjectchange</code> attribute to a JavaScript method to handle the object, passing the <literal>suggestion</literal> object as a parameter.
</para>
-
</section>
</chapter>
Modified: root/docs/trunk/Component_Reference/en-US/all-Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/all-Component_Reference.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/all-Component_Reference.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -34,7 +34,7 @@
<year>2009</year>
<holder>Red Hat</holder>
</copyright>
- <!-- FOR PUBLICAN --><legalnotice xml:base="Common_Content/Legal_Notice.xml">
+ <!-- FOR PUBLICAN --><legalnotice xml:base="Common_Content/Legal_Notice.xml">
<para>
Copyright <trademark class="copyright"/> 2009 Red Hat This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at <ulink url="http://www.gnu.org/licenses/fdl.txt">http://www.gnu.org/licenses/fdl.txt</ulink>).
</para>
@@ -51,7 +51,7 @@
</author>
</authorgroup>
</bookinfo>
- <!-- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> --><chapter id="chap-Component_Reference-Introduction" lang="en-US">
+ <!-- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> --><chapter id="chap-Component_Reference-Introduction" lang="en-US">
<title>Introduction</title>
<para>
This book is a guide to the various components available in the RichFaces 4.0 framework. It includes descriptions of the role of the components, details on how best to use them, coded examples of their use, and basic references of their properties and attributes.
@@ -138,12 +138,12 @@
A component with <code>limitRender="true"</code> specified will <emphasis>not</emphasis> cause components with <code>ajaxRendered="true"</code> to re-render, and only those components listed in the <code>render</code> attribute will be updated. This essentially overrides the <code>ajaxRendered</code> attribute in other components.
</para>
<para>
- <xref linkend="exam-Component_Reference-limitRender-Rendering_example"/> describes two command buttons, a panel grid rendered by the buttons, and an output panel showing error messages. When the first button is clicked, the output panel is rendered even though it is not explicitly referenced with the <code>render</code> attribute. The second button, however, uses <code>limitRender="true"</code> to override the output panel's rendering and only render the panel grid.
+ <xref linkend="exam-Component_Reference-data-Data_reference_example"/> describes two command buttons, a panel grid rendered by the buttons, and an output panel showing error messages. When the first button is clicked, the output panel is rendered even though it is not explicitly referenced with the <code>render</code> attribute. The second button, however, uses <code>limitRender="true"</code> to override the output panel's rendering and only render the panel grid.
</para>
<example id="exam-Component_Reference-limitRender-Rendering_example">
<title>Rendering example</title>
-<programlisting role="XML">
+<programlisting language="XML">
<h:form id="form1">
<a4j:commandButton value="Normal rendering" render="infoBlock" />
<a4j:commandButton value="Limited rendering" render="infoBlock" limitRender="true" />
@@ -167,39 +167,52 @@
<section id="sect-Component_Reference-Queuing_and_traffic_control-queue">
<title>queue</title>
<para>
- The <code>queue</code> attribute defines the name of the queue that will be used to schedule upcoming Ajax requests. Typically RichFaces does not queue Ajax requests, so if events are produced simultaneously they will arrive at the server simultaneously. This can potentially lead to unpredictable results when the responses are returned. The <code>queue</code> attribute ensures that the
+ The <code>queue</code> attribute defines the name of the queue that will be used to schedule upcoming Ajax requests. Typically RichFaces does not queue Ajax requests, so if events are produced simultaneously they will arrive at the server simultaneously. This can potentially lead to unpredictable results when the responses are returned. The <code>queue</code> attribute ensures that the requests are responded to in a set order.
</para>
+ <para>
+ A queue name is specified with the <code>queue</code> attribute, and each request added to the named queue is completed one at a time in the order they were sent. In addition, RichFaces intelligently removes similar requests produced by the same event from a queue to improve performance, protecting against unnecessary traffic flooding and
+ </para>
</section>
+
+ <section id="sect-Component_Reference-Queuing_and_traffic_control-requestDelay">
+ <title>requestDelay</title>
+ <para>
+ The <code>requestDelay</code> attribute specifies an amount of time in milliseconds for the request to wait in the queue before being sent to the server. If a similar request is added to the queue before the delay is over, the original request is removed from the queue and not sent.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-Queuing_and_traffic_control-ignoreDupResponses">
+ <title>ignoreDupResponses</title>
+ <para>
+ When set to <literal>true</literal>, the <code>ignoreDupResponses</code> attribute causes responses from the server for the request to be ignored if there is another similar request in the queue. This avoids unnecessary updates on the client when another update is expected. The request is still processed on the server, but if another similar request has been queued then no updates are made on the client.
+ </para>
+ </section>
</section>
<section id="sect-Component_Reference-Common_Ajax_attributes-Data_processing">
<title>Data processing</title>
- <section id="sect-Component_Reference-Data_processing-execute">
- <title>execute</title>
- <para>
- Incomplete
- </para>
- </section>
-
+ <para>
+ RichFaces uses a form-based approach for sending Ajax requests. As such, each time a request is sent the data from the requesting component's parent <acronym>JSF</acronym> form is submitted along with the <acronym>XMLHTTPRequest</acronym> object. The form data contains values from the input element and auxiliary information such as state-saving data.
+ </para>
<section id="sect-Component_Reference-Data_processing-process">
<title>process</title>
<para>
- Incomplete
+ The <code>process</code> attribute allows <acronym>JSF</acronym> processing to be limited to defined components. To only process the requesting component, <code>process="@this"</code> can be used.
</para>
</section>
<section id="sect-Component_Reference-Data_processing-immediate">
<title>immediate</title>
<para>
- Incomplete
+ If the <code>immediate</code> attribute is set to <literal>true</literal>, the default ActionListener is executed immediately during the Apply Request Values phase of the request processing lifecycle, rather than waitingfor the Invoke Application phase. This allows some data model values to be updated regardless of whether the Validation phase is successful or not.
</para>
</section>
<section id="sect-Component_Reference-Data_processing-bypassUpdates">
<title>bypassUpdates</title>
<para>
- Incomplete
+ If the <code>bypassUpdates</code> attribute is set to <literal>true</literal>, the Update Model phase of the request processing lifecycle is bypassed. This is useful if user input needs to be validated but the model does not need to be updated.
</para>
</section>
@@ -207,71 +220,87 @@
<section id="sect-Component_Reference-Common_Ajax_attributes-Action_and_navigation">
<title>Action and navigation</title>
+ <para>
+ The <code>action</code> and <code>actionListener</code> attributes can be used to invoke action methods and define action events.
+ </para>
<section id="sect-Component_Reference-Action_and_navigation-action">
<title>action</title>
<para>
- Incomplete
+ The <code>action</code> attribute is a method binding that points to the application action to be invoked. The method can be activated during the Apply Request Values phase or the Invoke Application phase of the request processing lifecycle.
</para>
+ <para>
+ The method specified in the <code>action</code> attribute must return <literal>null</literal> for an Ajax response with a partial page update.
+ </para>
</section>
<section id="sect-Component_Reference-Action_and_navigation-actionListener">
<title>actionListener</title>
<para>
- Incomplete
+ The <code>actionListener</code> attribute is a method binding for <classname>ActionEvent</classname> methods with a return type of <literal>void</literal>.
</para>
</section>
</section>
- <section id="sect-Component_Reference-Common_Ajax_attributes-Events_and_Javascript_interactions">
- <title>Events and Javascript interactions</title>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-onsubmit">
+ <section id="sect-Component_Reference-Common_Ajax_attributes-Events_and_JavaScript_interactions">
+ <title>Events and JavaScript interactions</title>
+ <para>
+ RichFaces allows for Ajax-enabled <acronym>JSF</acronym> applications to be developed without using any additional JavaScript code. However it is still possible to invoke custom JavaScript code through Ajax events.
+ </para>
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-onsubmit">
<title>onsubmit</title>
<para>
- Incomplete
+ The <code>onsubmit</code> attribute will invoke the JavaScript code before the Ajax request is sent. The request is canceled if the JavaScript code defined for <code>onsubmit</code> returns <literal>false</literal>.
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-onclick">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-onclick">
<title>onclick</title>
<para>
- Incomplete
+ The <code>onclick</code> attribute functions similarly to the <code>onsubmit</code> attribute for those components that can be clicked, such as <classname><a4j:commandButton></classname> and <classname><a4j:commandLink></classname>. It invokes the defined JavaScript before the Ajax request, and the request will be canceled if the defined code returns <literal>false</literal>.
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-oncomplete">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-oncomplete">
<title>oncomplete</title>
<para>
- Incomplete
+ The <code>oncomplete</code> attribute invokes the JavaScript code after the Ajax response has been returned and the <acronym>DOM</acronym> tree of the browser has been updated. The code is registered for further invocation of the <acronym>XMLHTTP</acronym> request object before an Ajax request is sent. As such, using <acronym>JSF</acronym> Expression Language (<acronym>EL</acronym>) value binding means the code will not be changed during processing of the request on the server. Additionally the <code>oncomplete</code> attribute cannot use the <literal>this</literal> keyword as it will not point to the component from which the Ajax request was initiated.
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-onbegin">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-onbegin">
<title>onbegin</title>
<para>
Incomplete
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-onsuccess">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-onsuccess">
<title>onsuccess</title>
<para>
Incomplete
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-onerror">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-onerror">
<title>onerror</title>
<para>
Incomplete
</para>
</section>
- <section id="sect-Component_Reference-Events_and_Javascript_interactions-data">
+ <section id="sect-Component_Reference-Events_and_JavaScript_interactions-data">
<title>data</title>
<para>
- Incomplete
+ The <code>data</code> attribute allows the use of additional data during an Ajax call. <acronym>JSF</acronym> Expression Language (<acronym>EL</acronym>) can be used to reference the property of the managed bean, and its value will be serialized in JavaScript Object Notation (<acronym>JSON</acronym>) and returned to the client side. The property can then be referenced through the <code>data</code> variable in the event attribute definitions. Both primitive types and complex types such as arrays and collections can be serialized and used with <code>data</code>.
</para>
+ <example id="exam-Component_Reference-data-Data_reference_example">
+ <title>Data reference example</title>
+
+<programlisting language="XML">
+<a4j:commandButton value="Update" data="#{userBean.name}" oncomplete="showTheName(data.name)" />
+</programlisting>
+ </example>
</section>
</section>
@@ -280,76 +309,400 @@
<chapter id="chap-Component_Reference-Rich_inputs" lang="en-US">
<title>Rich inputs</title>
<para>
- Incomplete
+ This chapter details rich components for user input and interaction.
</para>
<section id="sect-Component_Reference-Rich_inputs-richCalendar">
- <title>rich:Calendar</title>
+ <title><rich:Calendar></title>
<para>
- Incomplete
+ The <classname><rich:calendar></classname> component allows the user to enter a date and time through an in-line or pop-up calendar. The pop-up calendar can navigate through months and years, and its look and feel can be highly customized.
</para>
+ <para>
+ The <classname><rich:calendar></classname> component supports two different ways of loading data through defining the <code>mode</code> attribute. When not specified, the component uses <literal>client</literal> mode, which loads an initial portion of data within a set date range. The range can be defined by using the <code>preloadDateRangeBegin</code> and <code>preloadDateRangeEnd</code> attributes. Additional data requests are not sent. Alternatively, with <code>mode="ajax"</code> the <classname><rich:calendar></classname> requests portions of data for rendering from a special data model. The data model can be defined through the <code>dataModel</code> attribute, which points to an object that implements the <classname>CalendarDataModel</classname> interface. If the <code>dataModel</code> attribute is not defined or has a value of <literal>null</literal>, the <literal>ajax</literal> mode functions the same as the <literal>client</literal> mode.
+ </para>
+ <para>
+ The <classname><rich:calendar></classname> component is presented as a pop-up by default, appearing as a text field with a button to expand the full pop-up calendar. Specifying <code>popup="false</code> will render the calendar in-line on the page instead, which displays the full calendar without the text field or display button. The appearance of the display button can be altered from the standard calendar icon by defining the <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes to replace the icon with a specified file, or by defining the <code>buttonLabel</code> attribute to display text on the button without an icon. If <code>buttonLabel</code> is specified then both <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes are ignored. The text field box can also be hidden by setting <code>showInput="false"</code>.
+ </para>
+ <para>
+ The position at which the pop-up calendar displays relative to the text field and button can be configured using the <code>jointPoint</code> and <code>direction</code> attributes. The <code>jointPoint</code> attribute refers to the corner of the text field and button with which the calendar will be aligned and the <code>direction</code> specifies which direction the pop-up calendar will span relative to the joint point. The default settings are <code>jointPoint="bottom-left"</code> and <code>direction="bottom-right"</code>, causing the pop-up calendar to align with the bottom-left corner of the text field and span to the bottom-right, underneath the text field and button. The diagram shows the joint points and directions that can be used. Alternatively, both <code>jointPoint</code> and <code>direction</code> can be set to <literal>auto</literal> to allow smart pop-up positioning.
+ </para>
+ <para>
+ The calendar features a <guibutton>Today</guibutton> button for locating today's date on the calendar. This can be set to three different values using the <code>todayControlMode</code> attribute:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>hidden</literal>, which does not display the button;
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>select</literal>, the default setting, which scrolls the calendar to the current month and selects today's date; and
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>scroll</literal>, which scrolls the calendar to the current month but does not select today's date.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <classname><rich:calendar></classname> component can additionally allow a time of day to be specified with the date. After selecting a date the option to set a time becomes available. The default time can be set with the <code>defaultTime</code> attribute. If the time is altered and a new date is selected, it will not reset unless <code>resetTimeOnDateSelect="true"</code> is specified.
+ </para>
+ <para>
+ There are several event handlers that are unique to the <classname><rich:calendar></classname> component.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>ondateselect</code> is triggered when the date is selected by the user, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ondateselected</code> is triggered after the date is selected by the user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oncurrentdateselect</code> is triggered when any of the year- or month-changing buttons are pressed, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oncurrentdateselected</code> is triggered after any of the year- or month-changing buttons are pressed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ontimeselect</code> is triggered when the time is set by the user, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ontimeselected</code> is triggered after the time has been set by the user.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The entire calendar can be set as read-only with <code>readonly="true"</code>. This allows months and years to be browsed through with the arrow controls, but dates and times cannot be selected.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richcolorPicker">
- <title>rich:colorPicker</title>
+ <title><rich:colorPicker></title>
<para>
- Incomplete
+ The <classname><rich:colorPicker></classname> component allows the selection of a color, either by picking the color from the spectrum, defining it through decimal or hexadecimal <acronym>RGB</acronym> (red-green-blue) values, or defining it through <acronym>HSB</acronym> (hue-saturation-brightness) values. The <classname><rich:colorPicker></classname> component can appear either in-line with a pop-up or flat, and the look and feel can be highly customized.
</para>
+ <para>
+ The <code>value</code> attribute stores the currently selected color. The <code>colorMode</code> attribute defines whether the <code>value</code> is saved as <literal>hex</literal> (hexadecimal) or <literal>rgb</literal> (red-green-blue).
+ </para>
+ <para>
+ The <classname><rich:colorPicker></classname> appears in-line by default, where the color picker spectrum is only shown once the component is clicked on. The component can appear "flat", where the whole color picker is shown, by setting <code>flat="true"</code>.
+ </para>
+ <para>
+ The <classname><rich:colorPicker></classname> component has the unique event handler <code>onbeforeshow</code>, which is triggered immediately before the color picker is opened. The <code>showEvent</code> attribute can be used to bind the opening of the color picker to a specific event; it is bound to the <code>onclick</code> event by default.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richcomboBox">
- <title>rich:comboBox</title>
+ <title><rich:comboBox></title>
<para>
- Incomplete
+ The <classname><rich:comboBox></classname> component is a typical combo-box with built-in Ajax capabilities. It supports client-side suggestions, browser-like selection, Seam entity converter support, and customization of the look and feel.
</para>
+ <para>
+ The <code>value</code> attribute stores the selected value for the combo-box. Suggestions shown in the drop-down list for the combo-box can be specified in one of two ways:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Using the <code>suggestionValues</code> attribute, and defining a collection of suggestions:
+ </para>
+ <example>
+ <title>Defining suggestion values</title>
+
+<programlisting language="XML">
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}"
+</programlisting>
+ </example>
+ </listitem>
+ <listitem>
+ <para>
+ Using the JSF components <classname><f:selectItem /></classname> and <classname><f:selectItems /></classname> to define a list of items:
+ </para>
+ <example id="exam-Component_Reference-richcomboBox-Defining_list_items_for_richinplaceSelect">
+ <title>Defining list items for <rich:inplaceSelect></title>
+
+<programlisting language="XML">
+<rich:comboBox value="#{bean.item}" valueChangeListener="#{bean.selectionChanged}" >
+ <f:selectItems value="#{bean.selectItems}" />
+ <f.selectItem itemValue="Item 1" />
+ <f.selectItem itemValue="Item 2" />
+ <f.selectItem itemValue="Item 3" />
+ <f.selectItem itemValue="Item 4" />
+</rich:comboBox>
+</programlisting>
+ </example>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Users can type into the combo-box's text field to enter a value, which also searches through the suggestion items in the drop-down box. By default, the first suggestion item is selected as the user types. This behavior can be deactivated by setting <code>selectFirstOnUpdate="false"</code>. Setting <code>directInputSuggestions="true"</code> causes the combo-box to fill the text field box with a matching suggestion as the user types. Alternatively, the text field can be disabled by setting <code>enableManualInput="false"</code>, which forces the users to pick from items in the drop-down box.
+ </para>
+ <para>
+ The <classname><rich:comboBox></classname> component has two unique event handlers:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>onlistcall</code> triggers before the drop-down list is shown, allowing the operation to be canceled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onselect</code> triggers when a suggestion is selected from the drop-down list, before the update request is sent.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richeditor">
- <title>rich:editor</title>
+ <title><rich:editor></title>
<para>
- Incomplete
+ The <classname><rich:editor></classname> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
</para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richfileUpload">
- <title>rich:fileUpload</title>
+ <title><rich:fileUpload></title>
<para>
- Incomplete
+ The <classname><rich:fileUpload></classname> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded flash module.
</para>
+ <para>
+ Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <code>createTempFile</code> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> for the project.
+ </para>
+ <para>
+ Basic usage requires the <code>uploadData</code> attribute, pointing to the collection of uploaded files.
+ </para>
+ <example>
+ <title>Basic usage of <rich:fileUpload></title>
+
+<programlisting language="XML">
+<rich:fileUpload uploadData="#{bean.data}" />
+</programlisting>
+ </example>
+ <para>
+ The <code>fileUploadListener</code> attribute can be used to call a function on the server side after each file is uploaded.
+ </para>
+ <para>
+ The <code>immediateUpload</code> attribute can be set to <literal>true</literal> to upload files as soon as they are added to the list, rather than waiting for the user to press the <guibutton>Upload</guibutton>. The <code>autoclear</code> attribute can be set to <code>true</code> to automatically remove files from the list once they have been successfully uploaded.
+ </para>
+ <para>
+ The <classname><rich:fileUpload></classname> component can place restrictions on the files that can be uploaded. The <code>acceptedTypes</code> attribute restricts the file types to just those listed. The <code>maxFilesQuantity</code> attribute restricts the maximum number of files that can be uploaded. Size restrictions can be placed on individual files by setting the <code>maxRequestSize</code> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> file for the project.
+ </para>
+ <para>
+ There are a number of event handlers specifc to the <classname><rich:fileUpload></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>onadd</code> is triggered before a file is added to the list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onupload</code> is triggered before a file is uploaded.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onuploadcomplete</code> is triggered after all files in the list have finished uploading.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onuploadcanceled</code> is triggered after an upload has been canceled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onerror</code> is triggered when an error occurs during the upload process.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <classname><rich:fileUpload></classname> component has an embedded Flash module that adds extra functionality. To enable the Flash module, set <code>allowFlash="true"</code>. The Flash module adds additional features to file selection, such as the ability to choose multiple files at once and the filtering of files by their type. Additionally, the Flash module provides a smoother animation of the progress bar during the upload process, as the progress polling is performed by Flash rather than Ajax.
+ </para>
+ <para>
+ The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using <code>addControlLabel</code>, <code>clearAllControlLabel</code>, <code>clearControlLabel</code>, <code>stopEntryControlLabel</code>, and <code>uploadControlLabel</code>. The status label for the upload can be set using the <code>label</code> attribute and the following wildcards:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>{B} {KB} {MB}</code>: the full size of the file to be uploaded, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{_B} {_KB} {_MB}</code>: the amount of data uploaded so far, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{ss} {mm} {hh}</code>: the elapsed time in seconds, minutes and hours respectively.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceInput">
- <title>rich:inplaceInput</title>
+ <title><rich:inplaceInput></title>
<para>
- Incomplete
+ The <classname><rich:inplaceInput></classname> component allows information to be entered in-line in blocks of text, improving readability of the text. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can input text; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
+ <para>
+ When in the initial "view" state, the starting label can be set using the <code>defaultLabel</code> attribute, such as <code>defaultLabel="click to edit"</code>.
+ </para>
+ <para>
+ Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component.
+ </para>
+ <para>
+ By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the existing text can be automatically highlighted to make editing easier by setting <code>selectOnEdit="true"</code>.
+ </para>
+ <para>
+ The user can confirm and save their input by pressing the <keycap>Enter</keycap> key or cancel by pressing the <keycap>Esc</keycap> key. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
+ </para>
+ <para>
+ There are several event handlers that are specific to the <classname><rich:inplaceInput></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>oneditactivation</code> is triggered before the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oneditactivated</code> is triggered after the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivation</code> is triggered before the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivated</code> is triggered after the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceSelect">
- <title>rich:inplaceSelect</title>
+ <title><rich:inplaceSelect></title>
<para>
- Incomplete
+ The <classname><rich:inplaceSelect></classname> component is similar to the <classname><rich:inplaceInput></classname> component, but the uses a drop-down selection box to enter text instead of a regular text field. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can select a value from a drop-down list; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
+ <para>
+ When in the initial "view" state, the starting label can be set using the <code>defaultLabel</code> attribute, such as <code>defaultLabel="click to edit"</code>.
+ </para>
+ <para>
+ Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component and a list of items. The list of items can be defined using the JSF components <classname><f:selectItem/></classname> and <classname><f:selectItems/></classname>.
+ </para>
+ <example id="exam-Component_Reference-richinplaceSelect-Defining_list_items_for_richinplaceSelect">
+ <title>Defining list items for <rich:inplaceSelect></title>
+
+<programlisting language="XML">
+<rich:inplaceSelect value="#{bean.inputValue}" defaultLabel="click to edit" >
+ <f:selectItems value="#{bean.selectItems}" />
+ <f.selectItem itemValue="1" itemLabel="Item 1" />
+ <f.selectItem itemValue="2" itemLabel="Item 2" />
+ <f.selectItem itemValue="3" itemLabel="Item 3" />
+ <f.selectItem itemValue="4" itemLabel="Item 4" />
+</rich:comboBox>
+</programlisting>
+ </example>
+ <para>
+ By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the drop-down list of possible values will automatically be displayed; this can be deactivated by setting <code>openOnEdit="false"</code>.
+ </para>
+ <para>
+ Once the user selects an option from the drop-down list, the item becomes the new value for the component and the state is switched to the "changed" state. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
+ </para>
+ <para>
+ There are several event handlers that are specific to the <classname><rich:inplaceSelect></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>oneditactivation</code> is triggered before the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oneditactivated</code> is triggered after the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivation</code> is triggered before the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivated</code> is triggered after the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSlider">
- <title>rich:inputNumberSlider</title>
+ <title><rich:inputNumberSlider></title>
<para>
- Incomplete
+ The <classname><rich:inputNumberSlider></classname> component provides a slider for changing numerical values. Optional features include a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
</para>
+ <para>
+ Basic use of the component with no attributes specified will render a slider with a minimum value of 0, a maximum of 100, and a gradient step of 1, together with a text field for typing the desired numerical value. The text field can be removed by setting <code>showInput="false"</code>, and the properties of the slider can be set with the attributes <code>minValue</code>, <code>maxValue</code>, and <code>step</code>. The slider is labeled with the minimum and maximum boundary values, and a tool-tip showing the current value is shown while sliding the slider; these items can be turned off by setting <code>showBoundaryValues="false"</code> and <code>showToolTip="false"</code> respectively.
+ </para>
+ <para>
+ Arrow controls can be added to either side of the slider to adjust the value incrementally by setting <code>showArrows="true"</code>. Clicking the arrows move the slider indicator in that direction by the gradient step, and clicking and holding the arrows moves the indicator continuously. The time delay for each step when updating continuously can be defined using the <code>delay</code> attribute.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSpinner">
- <title>rich:inputNumberSpinner</title>
+ <title><rich:inputNumberSpinner></title>
<para>
- Incomplete
+ The <classname><rich:inputNumberSpinner></classname> component is a single-line input field with buttons to increase and decrease a numerical value. The value can be changed using the corresponding directional keys on a keyboard, or by typing into the field.
</para>
+ <para>
+ Basic use of the component with no attributes specified will render a number spinner with a minimum value of 1, a maximum value of 100, and a gradient step of 1. These default properties can be re-defined with the attributes <code>minValue</code>, <code>maxValue</code>, and <code>step</code> respectively. The starting value of the spinner is the minimum value unless otherwise specified with the <code>value</code> attribute.
+ </para>
+ <para>
+ When changing the value using the buttons, raising the value above the maximum or cause the spinner to restart at the minimum value. Likewise, when lowering below the minimum value the spinner will reset to the maximum value. This behavior can be deactivated by setting <code>cycled="false"</code>, which will cause the buttons to stop responding when the reach the maximum or minimum value.
+ </para>
+ <para>
+ The ability to change the value by typing into the text field can be disabled by setting <code>enableManualInput="false"</code>.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richsuggestionBox">
- <title>rich:suggestionBox</title>
+ <title><rich:suggestionBox></title>
<para>
- Incomplete
+ The <classname><rich:suggestionBox></classname> component adds a feature-rich drop-down list of suggestions to any text input component.
</para>
+ <para>
+ The <classname><rich:suggestionBox></classname> component needs the attributes defined for basic use: <code>for</code>, which identifies the component to attach the suggestion box to; <code>suggestionAction</code>, which defines the method for getting the collection of suggestion data; and <code>var</code>, which defines a collection name for access to the currently highlighted row. Typically the suggestions are presented as a list with one or more columns of suggestion data; the layout of these columns is defined inside the <classname><rich:suggestionBox></classname> tags using <classname><h:column></classname> and other <acronym>JSF</acronym> components.
+ </para>
+ <para>
+ For suggestion lists with multiple columns, the <code>fetchValue</code> attribute can be used to specify which column is used when selecting the value for the input component.
+ </para>
+ <para>
+ The <code>tokens</code> attribute can be used to define separator characters, which are used when multiple values need to be entered and a new suggestion made for each value. For example, <code>tokens=","</code> (a comma) will begin a new suggestion query each time a comma is typed. Multiple separators can be defined with spaces in between (<code>tokens=", . ; [ ]"</code>) or linking to a bean property that holds the collection of separator tokens.
+ </para>
+ <para>
+ The <code>minChars</code> attribute can be used to limit sending the Ajax request until a certain amount of characters has been entered. If the query returns no results, an appropriate message to display can be set with the <code>nothingLabel</code> attribute.
+ </para>
+ <para>
+ Instead of returning just one value from an object, the entire object can be returned to the client and handled appropriately. This is done by specifying <code>usingSuggestObjects="true"</code> and setting the <code>onobjectchange</code> attribute to a JavaScript method to handle the object, passing the <literal>suggestion</literal> object as a parameter.
+ </para>
</section>
</chapter>
Modified: root/docs/trunk/Component_Reference/en-US/fallback_content/Conventions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/fallback_content/Conventions.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/fallback_content/Conventions.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -1,10 +1,8 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Common_Content.ent">
-%BOOK_ENTITIES;
]>
-<section>
+<section id="sect-Component_Reference-Document_Conventions">
<title>Document Conventions</title>
<para>
This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
@@ -12,7 +10,7 @@
<para>
In PDF and paper editions, this manual uses typefaces drawn from the <ulink url="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</ulink> set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.
</para>
- <section>
+ <section id="sect-Component_Reference-Document_Conventions-Typographic_Conventions">
<title>Typographic Conventions</title>
<para>
Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
@@ -103,7 +101,7 @@
</blockquote>
</section>
- <section>
+ <section id="sect-Component_Reference-Document_Conventions-Pull_quote_Conventions">
<title>Pull-quote Conventions</title>
<para>
Two, commonly multi-line, data types are set off visually from the surrounding text.
@@ -144,7 +142,7 @@
</programlisting>
</section>
- <section>
+ <section id="sect-Component_Reference-Document_Conventions-Notes_and_Warnings">
<title>Notes and Warnings</title>
<para>
Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
Modified: root/docs/trunk/Component_Reference/en-US/fallback_content/Feedback.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/fallback_content/Feedback.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/fallback_content/Feedback.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -1,8 +1,8 @@
-<?xml version='1.0'?>
+<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
-<section>
+<section id="sect-Component_Reference-We_Need_Feedback">
<title>We Need Feedback!</title>
<indexterm>
<primary>feedback</primary>
Modified: root/docs/trunk/Component_Reference/en-US/fallback_content/Legal_Notice.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/fallback_content/Legal_Notice.xml 2009-11-04 08:18:18 UTC (rev 15819)
+++ root/docs/trunk/Component_Reference/en-US/fallback_content/Legal_Notice.xml 2009-11-04 08:36:06 UTC (rev 15820)
@@ -7,10 +7,10 @@
Copyright <trademark class="copyright"></trademark> &YEAR; &HOLDER;. This material may only be distributed subject to the terms and conditions set forth in the Open Publication License, V1.0, (the latest version is presently available at <ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).
</para>
<para>
- Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
+ Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
</para>
<para>
- <trademark class="registered">Linux</trademark> is the registered trademark of Linus Torvalds in the United States and other countries.
+ <trademark class="registered">Linux</trademark> is the registered trademark of Linus Torvalds in the United States and other countries.
</para>
<para>
All other trademarks are the property of their respective owners.
15 years, 1 month
JBoss Rich Faces SVN: r15819 - root/docs/trunk/Component_Reference/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-11-04 03:18:18 -0500 (Wed, 04 Nov 2009)
New Revision: 15819
Modified:
root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml
Log:
Worked on Component Reference chapters
Modified: root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml 2009-11-02 18:33:53 UTC (rev 15818)
+++ root/docs/trunk/Component_Reference/en-US/Rich_inputs.xml 2009-11-04 08:18:18 UTC (rev 15819)
@@ -16,75 +16,380 @@
The <classname><rich:calendar></classname> component supports two different ways of loading data through defining the <code>mode</code> attribute. When not specified, the component uses <literal>client</literal> mode, which loads an initial portion of data within a set date range. The range can be defined by using the <code>preloadDateRangeBegin</code> and <code>preloadDateRangeEnd</code> attributes. Additional data requests are not sent. Alternatively, with <code>mode="ajax"</code> the <classname><rich:calendar></classname> requests portions of data for rendering from a special data model. The data model can be defined through the <code>dataModel</code> attribute, which points to an object that implements the <classname>CalendarDataModel</classname> interface. If the <code>dataModel</code> attribute is not defined or has a value of <literal>null</literal>, the <literal>ajax</literal> mode functions the same as the <literal>client</literal> mode.
</para>
<para>
- The <classname><rich:calendar></classname> component is presented as a pop-up by default, appearing as a text input with a button to expand the full pop-up calendar. Specifying <code>popup="false</code> will render the calendar in-line on the page instead, which displays the full calendar without the text input or display button. The appearance of the display button can be altered from the standard calendar icon by defining the <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes to replace the icon with a specified file, or by defining the <code>buttonLabel</code> attribute to display text on the button without an icon. If <code>buttonLabel</code> is specified then both <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes are ignored.
+ The <classname><rich:calendar></classname> component is presented as a pop-up by default, appearing as a text field with a button to expand the full pop-up calendar. Specifying <code>popup="false</code> will render the calendar in-line on the page instead, which displays the full calendar without the text field or display button. The appearance of the display button can be altered from the standard calendar icon by defining the <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes to replace the icon with a specified file, or by defining the <code>buttonLabel</code> attribute to display text on the button without an icon. If <code>buttonLabel</code> is specified then both <code>buttonIcon</code> and <code>buttonIconDisabled</code> attributes are ignored. The text field box can also be hidden by setting <code>showInput="false"</code>.
</para>
<para>
-
+ The position at which the pop-up calendar displays relative to the text field and button can be configured using the <code>jointPoint</code> and <code>direction</code> attributes. The <code>jointPoint</code> attribute refers to the corner of the text field and button with which the calendar will be aligned and the <code>direction</code> specifies which direction the pop-up calendar will span relative to the joint point. The default settings are <code>jointPoint="bottom-left"</code> and <code>direction="bottom-right"</code>, causing the pop-up calendar to align with the bottom-left corner of the text field and span to the bottom-right, underneath the text field and button. The diagram shows the joint points and directions that can be used. Alternatively, both <code>jointPoint</code> and <code>direction</code> can be set to <literal>auto</literal> to allow smart pop-up positioning.
</para>
+ <para>
+ The calendar features a <guibutton>Today</guibutton> button for locating today's date on the calendar. This can be set to three different values using the <code>todayControlMode</code> attribute:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>hidden</literal>, which does not display the button;
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>select</literal>, the default setting, which scrolls the calendar to the current month and selects today's date; and
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>scroll</literal>, which scrolls the calendar to the current month but does not select today's date.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <classname><rich:calendar></classname> component can additionally allow a time of day to be specified with the date. After selecting a date the option to set a time becomes available. The default time can be set with the <code>defaultTime</code> attribute. If the time is altered and a new date is selected, it will not reset unless <code>resetTimeOnDateSelect="true"</code> is specified.
+ </para>
+ <para>
+ There are several event handlers that are unique to the <classname><rich:calendar></classname> component.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>ondateselect</code> is triggered when the date is selected by the user, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ondateselected</code> is triggered after the date is selected by the user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oncurrentdateselect</code> is triggered when any of the year- or month-changing buttons are pressed, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oncurrentdateselected</code> is triggered after any of the year- or month-changing buttons are pressed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ontimeselect</code> is triggered when the time is set by the user, before the update request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>ontimeselected</code> is triggered after the time has been set by the user.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The entire calendar can be set as read-only with <code>readonly="true"</code>. This allows months and years to be browsed through with the arrow controls, but dates and times cannot be selected.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richcolorPicker">
<title><rich:colorPicker></title>
<para>
- Incomplete
+ The <classname><rich:colorPicker></classname> component allows the selection of a color, either by picking the color from the spectrum, defining it through decimal or hexadecimal <acronym>RGB</acronym> (red-green-blue) values, or defining it through <acronym>HSB</acronym> (hue-saturation-brightness) values. The <classname><rich:colorPicker></classname> component can appear either in-line with a pop-up or flat, and the look and feel can be highly customized.
</para>
+ <para>
+ The <code>value</code> attribute stores the currently selected color. The <code>colorMode</code> attribute defines whether the <code>value</code> is saved as <literal>hex</literal> (hexadecimal) or <literal>rgb</literal> (red-green-blue).
+ </para>
+ <para>
+ The <classname><rich:colorPicker></classname> appears in-line by default, where the color picker spectrum is only shown once the component is clicked on. The component can appear "flat", where the whole color picker is shown, by setting <code>flat="true"</code>.
+ </para>
+ <para>
+ The <classname><rich:colorPicker></classname> component has the unique event handler <code>onbeforeshow</code>, which is triggered immediately before the color picker is opened. The <code>showEvent</code> attribute can be used to bind the opening of the color picker to a specific event; it is bound to the <code>onclick</code> event by default.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richcomboBox">
<title><rich:comboBox></title>
<para>
- Incomplete
+ The <classname><rich:comboBox></classname> component is a typical combo-box with built-in Ajax capabilities. It supports client-side suggestions, browser-like selection, Seam entity converter support, and customization of the look and feel.
</para>
+ <para>
+ The <code>value</code> attribute stores the selected value for the combo-box. Suggestions shown in the drop-down list for the combo-box can be specified in one of two ways:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Using the <code>suggestionValues</code> attribute, and defining a collection of suggestions:
+ </para>
+ <example>
+ <programlisting language="XML">
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}"
+ </programlisting>
+ </example>
+ </listitem>
+ <listitem>
+ <para>
+ Using the JSF components <classname><f:selectItem /></classname> and <classname><f:selectItems /></classname> to define a list of items:
+ </para>
+ <example>
+ <title>Defining list items for <rich:inplaceSelect></title>
+ <programlisting language="XML">
+<rich:comboBox value="#{bean.item}" valueChangeListener="#{bean.selectionChanged}" >
+ <f:selectItems value="#{bean.selectItems}" />
+ <f.selectItem itemValue="Item 1" />
+ <f.selectItem itemValue="Item 2" />
+ <f.selectItem itemValue="Item 3" />
+ <f.selectItem itemValue="Item 4" />
+</rich:comboBox>
+ </programlisting>
+ </example>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Users can type into the combo-box's text field to enter a value, which also searches through the suggestion items in the drop-down box. By default, the first suggestion item is selected as the user types. This behavior can be deactivated by setting <code>selectFirstOnUpdate="false"</code>. Setting <code>directInputSuggestions="true"</code> causes the combo-box to fill the text field box with a matching suggestion as the user types. Alternatively, the text field can be disabled by setting <code>enableManualInput="false"</code>, which forces the users to pick from items in the drop-down box.
+ </para>
+ <para>
+ The <classname><rich:comboBox></classname> component has two unique event handlers:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <code>onlistcall</code> triggers before the drop-down list is shown, allowing the operation to be canceled.
+ </listitem>
+ <listitem>
+ <code>onselect</code> triggers when a suggestion is selected from the drop-down list, before the update request is sent.
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richeditor">
<title><rich:editor></title>
<para>
- Incomplete
+ The <classname><rich:editor></classname> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
</para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richfileUpload">
<title><rich:fileUpload></title>
<para>
- Incomplete
+ The <classname><rich:fileUpload></classname> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded flash module.
</para>
+ <para>
+ Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <code>createTempFile</code> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> for the project.
+ </para>
+ <para>
+ Basic usage requires the <code>uploadData</code> attribute, pointing to the collection of uploaded files.
+ </para>
+ <example>
+ <programlisting language="XML">
+<rich:fileUpload uploadData="#{bean.data}" />
+ </programlisting>
+ </example>
+ <para>
+ The <code>fileUploadListener</code> attribute can be used to call a function on the server side after each file is uploaded.
+ </para>
+ <para>
+ The <code>immediateUpload</code> attribute can be set to <literal>true</literal> to upload files as soon as they are added to the list, rather than waiting for the user to press the <guibutton>Upload</guibutton>. The <code>autoclear</code> attribute can be set to <code>true</code> to automatically remove files from the list once they have been successfully uploaded.
+ </para>
+ <para>
+ The <classname><rich:fileUpload></classname> component can place restrictions on the files that can be uploaded. The <code>acceptedTypes</code> attribute restricts the file types to just those listed. The <code>maxFilesQuantity</code> attribute restricts the maximum number of files that can be uploaded. Size restrictions can be placed on individual files by setting the <code>maxRequestSize</code> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> file for the project.
+ </para>
+ <para>
+ There are a number of event handlers specifc to the <classname><rich:fileUpload></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>onadd</code> is triggered before a file is added to the list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onupload</code> is triggered before a file is uploaded.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onuploadcomplete</code> is triggered after all files in the list have finished uploading.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onuploadcanceled</code> is triggered after an upload has been canceled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onerror</code> is triggered when an error occurs during the upload process.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <classname><rich:fileUpload></classname> component has an embedded Flash module that adds extra functionality. To enable the Flash module, set <code>allowFlash="true"</code>. The Flash module adds additional features to file selection, such as the ability to choose multiple files at once and the filtering of files by their type. Additionally, the Flash module provides a smoother animation of the progress bar during the upload process, as the progress polling is performed by Flash rather than Ajax.
+ </para>
+ <para>
+ The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using <code>addControlLabel</code>, <code>clearAllControlLabel</code>, <code>clearControlLabel</code>, <code>stopEntryControlLabel</code>, and <code>uploadControlLabel</code>. The status label for the upload can be set using the <code>label</code> attribute and the following wildcards:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>{B} {KB} {MB}</code>: the full size of the file to be uploaded, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{_B} {_KB} {_MB}</code>: the amount of data uploaded so far, measured in bytes, kilobytes and megabytes respectively.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>{ss} {mm} {hh}</code>: the elapsed time in seconds, minutes and hours respectively.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceInput">
<title><rich:inplaceInput></title>
<para>
- Incomplete
+ The <classname><rich:inplaceInput></classname> component allows information to be entered in-line in blocks of text, improving readability of the text. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can input text; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
+ <para>
+ When in the initial "view" state, the starting label can be set using the <code>defaultLabel</code> attribute, such as <code>defaultLabel="click to edit"</code>.
+ </para>
+ <para>
+ Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component.
+ </para>
+ <para>By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the existing text can be automatically highlighted to make editing easier by setting <code>selectOnEdit="true"</code>.
+ </para>
+ <para>
+ The user can confirm and save their input by pressing the <keycap>Enter</keycap> key or cancel by pressing the <keycap>Esc</keycap> key. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
+ </para>
+ <para>
+ There are several event handlers that are specific to the <classname><rich:inplaceInput></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>oneditactivation</code> is triggered before the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oneditactivated</code> is triggered after the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivation</code> is triggered before the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivated</code> is triggered after the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceSelect">
<title><rich:inplaceSelect></title>
<para>
- Incomplete
+ The <classname><rich:inplaceSelect></classname> component is similar to the <classname><rich:inplaceInput></classname> component, but the uses a drop-down selection box to enter text instead of a regular text field. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can select a value from a drop-down list; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
+ <para>
+ When in the initial "view" state, the starting label can be set using the <code>defaultLabel</code> attribute, such as <code>defaultLabel="click to edit"</code>.
+ </para>
+ <para>
+ Basic usage requires the <code>value</code> attribute to point to the expression for the current value of the component and a list of items. The list of items can be defined using the JSF components <classname><f:selectItem/></classname> and <classname><f:selectItems/></classname>.
+ </para>
+ <example>
+ <title>Defining list items for <rich:inplaceSelect></title>
+ <programlisting language="XML">
+<rich:inplaceSelect value="#{bean.inputValue}" defaultLabel="click to edit" >
+ <f:selectItems value="#{bean.selectItems}" />
+ <f.selectItem itemValue="1" itemLabel="Item 1" />
+ <f.selectItem itemValue="2" itemLabel="Item 2" />
+ <f.selectItem itemValue="3" itemLabel="Item 3" />
+ <f.selectItem itemValue="4" itemLabel="Item 4" />
+</rich:comboBox>
+ </programlisting>
+ </example>
+ <para>By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <code>editEvent</code> attribute to specify a different event. When switching to "edit" mode, the drop-down list of possible values will automatically be displayed; this can be deactivated by setting <code>openOnEdit="false"</code>.
+ </para>
+ <para>
+ Once the user selects an option from the drop-down list, the item becomes the new value for the component and the state is switched to the "changed" state. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <code>controlsHorizontalPosition</code> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <code>controlsVerticalPosition</code> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <code>saveControlIcon</code> and <code>cancelControlIcon</code>. Further customization is possible through the use of facets.
+ </para>
+ <para>
+ There are several event handlers that are specific to the <classname><rich:inplaceSelect></classname> component:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>oneditactivation</code> is triggered before the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>oneditactivated</code> is triggered after the "edit" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivation</code> is triggered before the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>onviewactivated</code> is triggered after the "view" or "changed" state is activated.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
+ </section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSlider">
<title><rich:inputNumberSlider></title>
<para>
- Incomplete
+ The <classname><rich:inputNumberSlider></classname> component provides a slider for changing numerical values. Optional features include a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
</para>
+ <para>
+ Basic use of the component with no attributes specified will render a slider with a minimum value of 0, a maximum of 100, and a gradient step of 1, together with a text field for typing the desired numerical value. The text field can be removed by setting <code>showInput="false"</code>, and the properties of the slider can be set with the attributes <code>minValue</code>, <code>maxValue</code>, and <code>step</code>. The slider is labeled with the minimum and maximum boundary values, and a tool-tip showing the current value is shown while sliding the slider; these items can be turned off by setting <code>showBoundaryValues="false"</code> and <code>showToolTip="false"</code> respectively.
+ </para>
+ <para>
+ Arrow controls can be added to either side of the slider to adjust the value incrementally by setting <code>showArrows="true"</code>. Clicking the arrows move the slider indicator in that direction by the gradient step, and clicking and holding the arrows moves the indicator continuously. The time delay for each step when updating continuously can be defined using the <code>delay</code> attribute.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSpinner">
<title><rich:inputNumberSpinner></title>
<para>
- Incomplete
+ The <classname><rich:inputNumberSpinner></classname> component is a single-line input field with buttons to increase and decrease a numerical value. The value can be changed using the corresponding directional keys on a keyboard, or by typing into the field.
</para>
+ <para>
+ Basic use of the component with no attributes specified will render a number spinner with a minimum value of 1, a maximum value of 100, and a gradient step of 1. These default properties can be re-defined with the attributes <code>minValue</code>, <code>maxValue</code>, and <code>step</code> respectively. The starting value of the spinner is the minimum value unless otherwise specified with the <code>value</code> attribute.
+ </para>
+ <para>
+ When changing the value using the buttons, raising the value above the maximum or cause the spinner to restart at the minimum value. Likewise, when lowering below the minimum value the spinner will reset to the maximum value. This behavior can be deactivated by setting <code>cycled="false"</code>, which will cause the buttons to stop responding when the reach the maximum or minimum value.
+ </para>
+ <para>
+ The ability to change the value by typing into the text field can be disabled by setting <code>enableManualInput="false"</code>.
+ </para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richsuggestionBox">
<title><rich:suggestionBox></title>
<para>
- Incomplete
+ The <classname><rich:suggestionBox></classname> component adds a feature-rich drop-down list of suggestions to any text input component.
</para>
+ <para>
+ The <classname><rich:suggestionBox></classname> component needs the attributes defined for basic use: <code>for</code>, which identifies the component to attach the suggestion box to; <code>suggestionAction</code>, which defines the method for getting the collection of suggestion data; and <code>var</code>, which defines a collection name for access to the currently highlighted row. Typically the suggestions are presented as a list with one or more columns of suggestion data; the layout of these columns is defined inside the <classname><rich:suggestionBox></classname> tags using <classname><h:column></classname> and other <acronym>JSF</acronym> components.
+ </para>
+ <para>
+ For suggestion lists with multiple columns, the <code>fetchValue</code> attribute can be used to specify which column is used when selecting the value for the input component.
+ </para>
+ <para>
+ The <code>tokens</code> attribute can be used to define separator characters, which are used when multiple values need to be entered and a new suggestion made for each value. For example, <code>tokens=","</code> (a comma) will begin a new suggestion query each time a comma is typed. Multiple separators can be defined with spaces in between (<code>tokens=", . ; [ ]"</code>) or linking to a bean property that holds the collection of separator tokens.
+ </para>
+ <para>
+ The <code>minChars</code> attribute can be used to limit sending the Ajax request until a certain amount of characters has been entered. If the query returns no results, an appropriate message to display can be set with the <code>nothingLabel</code> attribute.
+ </para>
+ <para>
+ Instead of returning just one value from an object, the entire object can be returned to the client and handled appropriately. This is done by specifying <code>usingSuggestObjects="true"</code> and setting the <code>onobjectchange</code> attribute to a JavaScript method to handle the object, passing the <object>suggestion</object> object as a parameter.
+ </para>
+
</section>
</chapter>
15 years, 1 month
JBoss Rich Faces SVN: r15818 - root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-11-02 13:33:53 -0500 (Mon, 02 Nov 2009)
New Revision: 15818
Modified:
root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Row.java
Log:
Fixed compilation error caused by Row class
Modified: root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Row.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Row.java 2009-11-02 18:23:42 UTC (rev 15817)
+++ root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Row.java 2009-11-02 18:33:53 UTC (rev 15818)
@@ -23,7 +23,7 @@
import java.util.Iterator;
-import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
/**
* Marker interface for table columns, rendered as entire row.
@@ -36,6 +36,6 @@
* Get iterator for all columns contained in this row.
* @return
*/
- public Iterator<UIColumn> columns();
+ public Iterator<UIComponent> columns();
}
15 years, 1 month
JBoss Rich Faces SVN: r15817 - in root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-11-02 13:23:42 -0500 (Mon, 02 Nov 2009)
New Revision: 15817
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/ColumnsIterator.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/DataIterator.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/FixedChildrenIterator.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/IteratorBase.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/CellEncodeEvent.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ElementEncodeListener.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRendererBase.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/TableHolder.java
Log:
Code review results for tables-ui
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/ColumnsIterator.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/ColumnsIterator.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/ColumnsIterator.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -42,10 +42,13 @@
protected UIComponent nextItem(){
while (childrenIterator != null && childrenIterator.hasNext()) {
UIComponent child = childrenIterator.next();
- if(child instanceof javax.faces.component.UIColumn || child instanceof Column){
+ if (child instanceof javax.faces.component.UIColumn || child instanceof Column) {
return child;
}
}
+
+ //TODO nick - free childrenIterator field
+
return null;
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/DataIterator.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/DataIterator.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/DataIterator.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -24,6 +24,7 @@
import javax.faces.component.UIComponent;
+//TODO nick - rename to include component name
class DataIterator extends IteratorBase <UIComponent> {
private Iterator<UIComponent> facetsIterator;
@@ -41,13 +42,17 @@
UIComponent nextColumn = null;
while (nextColumn == null && childrenIterator.hasNext()) {
UIComponent child = childrenIterator.next();
- if((child instanceof UIColumn) && child.isRendered()) {
+ //TODO nick - why non-rendered children are filtered?
+ //TODO nick - should be (child instanceof UIColumn || child instanceof Column)?
+ if ((child instanceof UIColumn) && child.isRendered()) {
nextColumn = child;
} else if(checkAjaxComponent(child)) {
nextColumn = child;
}
}
+ //TODO nick - free childrenIterator
+
// ???
while (nextColumn == null && facetsIterator.hasNext()) {
UIComponent component = facetsIterator.next();
@@ -56,6 +61,8 @@
}
}
+ //TODO nick - free facetsIterator
+
return nextColumn;
}
@@ -67,6 +74,7 @@
return this.childrenIterator;
}
+ //TODO nick - what's this for?
protected boolean checkAjaxComponent(UIComponent child) {
return false;
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/FixedChildrenIterator.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/FixedChildrenIterator.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/FixedChildrenIterator.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -63,6 +63,7 @@
protected UIComponent getNextFacet() {
Iterator<UIComponent> facetsIterator = getFacetsIterator();
+ //TODO nick - while -> if
while(facetsIterator.hasNext()) {
return facetsIterator.next();
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/IteratorBase.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/IteratorBase.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/IteratorBase.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -7,6 +7,7 @@
* @author Anton Belevich
* @author Nick Belaevski
*/
+//TODO nick - rename this class
public abstract class IteratorBase<E> implements Iterator<E> {
private boolean isCompleted = false;
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -63,11 +63,13 @@
public void setSortExpression(String sortExpression) {
// Do nothing - subtable is not sortable element;
+ //TODO nick - throw exception
}
@Override
public boolean getRendersChildren() {
+ //TODO nick - why "false"?
return false;
}
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -35,6 +35,7 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIDataAdaptor;
import org.richfaces.component.UIDataTable;
+import org.richfaces.component.util.HtmlUtil;
/**
* @author shura
@@ -43,6 +44,7 @@
public abstract class AbstractRowsRenderer extends RendererBase implements DataVisitor, ElementEncodeListener {
public static final String[][] TABLE_EVENT_ATTRS = {
+ //TODO nick - clarify new names for attributes
{"onclick","onRowClick"},
{"ondblclick","onRowDblClick"},
{"onmousemove","onRowMouseMove"},
@@ -69,10 +71,13 @@
protected String getCellStyleClasses(FacesContext context, UIComponent component) {
StringBuffer styleClass = new StringBuffer();
+
// Construct predefined classes
+ //TODO nick - use FacesContext#attributes
Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
Object parentPredefined = requestMap.get(AbstractRowsRenderer.SKIN_CELL_CLASS_KEY);
if (null != parentPredefined) {
+ //TODO nick - use HtmlUtil.concatClasses(String ...);
styleClass.append(parentPredefined).append(" ");
} else {
styleClass.append(getCellSkinClass());
@@ -131,6 +136,7 @@
}
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ //TODO nick - move this down by classes hierarchy
if(component instanceof UIDataTable) {
encodeRows(context, (UIDataTable)component);
}
@@ -168,6 +174,7 @@
StringBuffer styleClass = new StringBuffer();
// Construct predefined classes
+ //TODO nick - use HtmlUtil.concatClasses(String ...);
if (null != parentPredefined) {
styleClass.append(parentPredefined).append(" ");
} else if (null != predefined) {
@@ -191,6 +198,7 @@
StringBuffer style = new StringBuffer();
// Construct predefined styles
+ //TODO nick - use HtmlUtil.concatStyles(String ...);
if (null != parentPredefined) {
style.append(parentPredefined).append(" ");
} else if (null != predefined) {
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -49,6 +49,7 @@
* @param attributeName - attribute name
* @return true if specified attribute should generate header on the table
*/
+ //TODO nick - rename this method
public boolean isHeaderFactoryColumnAttributePresent(UIDataTable table,String attributeName) {
Iterator<UIComponent> columns = table.columns();
boolean result = false;
@@ -74,6 +75,7 @@
return count;
}
+ //TODO nick - rename method
protected int calculateRowColumns(Iterator<UIComponent> col) {
int count = 0;
int currentLength = 0;
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/CellEncodeEvent.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/CellEncodeEvent.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/CellEncodeEvent.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -5,6 +5,7 @@
import javax.faces.component.UIColumn;
import javax.faces.context.FacesContext;
+//TODO nick - can this be UIComponent instead of UIColumn?
public class CellEncodeEvent implements ElementEncodeEvent <UIColumn> {
private FacesContext context;
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ElementEncodeListener.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ElementEncodeListener.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ElementEncodeListener.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -10,16 +10,19 @@
// public void encodeFirstCell(CellEncodeEvent event)throws IOException;
+ //TODO nick - also encodeFooterCell?
public void encodeHeaderCell(CellEncodeEvent event) throws IOException;
public void encodeCell(CellEncodeEvent event) throws IOException;
-
+
+ //TODO nick - encodeFirstRow and encodeRowStart are not on the same abstraction level
public void encodeFirstRow(RowEncodeEvent event) throws IOException;
public void encodeRowStart(RowEncodeEvent event) throws IOException;
public void encodeRowEnd(RowEncodeEvent event) throws IOException;
-
+
+ //TODO nick - should be removed?
public void encodeSubTable(FacesContext context, UISubTable subTable) throws IOException;
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRendererBase.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRendererBase.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRendererBase.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -86,6 +86,9 @@
// Encode colgroup definition.
ResponseWriter writer = context.getResponseWriter();
+
+ //TODO nick - do we need this element if "columnsWidth" is absent?
+ //TODO nick - use constants from HTML class for attribute/element names
writer.startElement("colgroup", table);
int columns = getColumnsCount(table);
@@ -113,6 +116,7 @@
public void encodeCaption(FacesContext context, UIDataTable table) throws IOException {
UIComponent caption = table.getCaption();
+ //TODO nick - check for "rendered" attribute
if (caption == null) {
return;
}
@@ -125,6 +129,7 @@
writer.writeAttribute("class", captionClass, "captionClass");
String captionStyle = (String) table.getAttributes().get("captionStyle");
+ //TODO nick - check for empty string
if (captionStyle != null) {
writer.writeAttribute("style", captionStyle, "captionStyle");
}
@@ -150,6 +155,7 @@
UIComponent header = table.getHeader();
boolean isEncodeHeaders = isEncodeHeaders(table);
+ //TODO nick - check for "rendered" attribute
if (header != null || isEncodeHeaders) {
ResponseWriter writer = context.getResponseWriter();
@@ -160,6 +166,7 @@
if (header != null) {
encodeTableHeaderFacet(context, columns, writer, header,
"rich-table-header",
+ //TODO nick - rename classes!!!
"rich-table-header-continue",
"rich-table-headercell",
headerClass, "th");
@@ -191,12 +198,16 @@
if (columnFacetPresent) {
writer.startElement("tr", table);
encodeStyleClass(writer, null, "rich-table-subfooter", null, footerClass);
+ //TODO nick - use "th" instead of "td"?
+ //TODO nick - rename method "encodeHeaderFacets"
encodeHeaderFacets(context, writer, tableColumns, "rich-table-subfootercell", footerClass, "footer",
"td", columns);
writer.endElement("tr");
}
if (footer != null) {
+ //TODO nick - use "th" instead of "td"?
+ //TODO nick - rename method "encodeTableHeaderFacet"
encodeTableHeaderFacet(context, columns, writer, footer,
"rich-table-footer",
"rich-table-footer-continue",
@@ -227,7 +238,8 @@
}
if (isColgroup) {
- RowEncoder encoder = getRowEncoder(null);
+ //TODO nick - tableHolder is null
+ RowEncoder encoder = getRowEncoder(null);
encoder.setHeader(true);
encoder.encodeRows(context, footer);
} else {
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/TableHolder.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/TableHolder.java 2009-11-02 16:11:39 UTC (rev 15816)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/TableHolder.java 2009-11-02 18:23:42 UTC (rev 15817)
@@ -33,7 +33,10 @@
public class TableHolder {
private UIDataAdaptor component;
private int rowCounter;
+
+ //TODO nick - not used anyhow
private int gridRowCounter;
+
private String[] rowClasses;
private String[] columnsClasses;
@@ -82,6 +85,7 @@
return getRowClass(row);
}
+ //TODO nick - this seems to be removed
public String getRowClass(int row) {
String rowClass = null;
if(null != rowClasses){
15 years, 1 month
JBoss Rich Faces SVN: r15816 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest: paint2d and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-11-02 11:11:39 -0500 (Mon, 02 Nov 2009)
New Revision: 15816
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/modalPanel/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/paint2d/locators.properties
Log:
* locators rewritten to use jQuery
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/modalPanel/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/modalPanel/locators.properties 2009-11-02 15:06:01 UTC (rev 15815)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/modalPanel/locators.properties 2009-11-02 16:11:39 UTC (rev 15816)
@@ -1,16 +1,16 @@
-FIRST_EXAMPLE_HEADER=//fieldset[1]/legend
-FIRST_PANEL=//div[contains(@class, 'rich-modalpanel') and contains(@id, 'panelContainer')]
-FIRST_PANEL_POSITION=//div[contains(@class, 'rich-modalpanel') and contains(@id, 'panelContainer')]/div[2]/div
-FIRST_PANEL_OPEN=//fieldset[1]/div/a
-FIRST_PANEL_CLOSE=//div[contains(@class, 'rich-modalpanel') and contains(@id, 'panelContainer')]/div[2]/div/div[2]/div/img
-FIRST_PANEL_HEADER=//div[contains(@class, 'rich-modalpanel') and contains(@id, 'panelContainer')]/div[2]/div/div[2]/table/tbody/tr[1]/td/div
-FIRST_PANEL_CONTENT=//div[contains(@class, 'rich-modalpanel') and contains(@id, 'panelContainer')]/div[2]/div/div[2]/table/tbody/tr[2]/td
+FIRST_EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+FIRST_PANEL=jquery=div.rich-modalpanel[id$=panelContainer]
+FIRST_PANEL_POSITION=jquery=div.rich-modalpanel[id$=panelContainer] > div:eq(1) > div
+FIRST_PANEL_OPEN=jquery=fieldset:eq(0) > div > a
+FIRST_PANEL_CLOSE=jquery=div.rich-modalpanel[id$=panelContainer] img[id$=hidelink]
+FIRST_PANEL_HEADER=jquery=div.rich-modalpanel[id$=panelContainer] div[id$=panelHeader]
+FIRST_PANEL_CONTENT=jquery=div.rich-modalpanel[id$=panelContainer] td.rich-mpnl-body
-SECOND_EXAMPLE_HEADER=//fieldset[2]/legend
-SECOND_PANEL=//div[@id='mpContainer']
-SECOND_PANEL_POSITION=//div[@id='mpContainer']/div[2]/div
-SECOND_PANEL_OPEN=//fieldset[2]/div/a
-SECOND_PANEL_CLOSE=//div[@id='mpContainer']/div[2]/div/div[2]/table/tbody/tr[2]/td/p[3]/a
-SECOND_PANEL_HEADER=//div[@id='mpContainer']/div[2]/div/div[2]/table/tbody/tr[1]/td/div
-SECOND_PANEL_CONTENT=//div[@id='mpContainer']/div[2]/div/div[2]/table/tbody/tr[2]/td
+SECOND_EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+SECOND_PANEL=jquery=div#mpContainer
+SECOND_PANEL_POSITION=jquery=div#mpContainer > div:eq(1) > div
+SECOND_PANEL_OPEN=jquery=fieldset:eq(1) > div > a
+SECOND_PANEL_CLOSE=jquery=div#mpContainer td.rich-mpnl-body a
+SECOND_PANEL_HEADER=jquery=div#mpContainer div#mpHeader
+SECOND_PANEL_CONTENT=jquery=div#mpContainer td.rich-mpnl-body
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/paint2d/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/paint2d/locators.properties 2009-11-02 15:06:01 UTC (rev 15815)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/paint2d/locators.properties 2009-11-02 16:11:39 UTC (rev 15816)
@@ -1,7 +1,7 @@
-EXAMPLE_HEADER=//fieldset/legend
-INPUT_TEXT=//fieldset//form/table//td[1]/input
-INPUT_COLOR=//div[contains(@class, 'rich-color-picker-wrapper')]//div[5]/input
-BUTTON_APPLY_COLOR=//div[contains(@class, 'rich-color-picker-wrapper')]//button[1]
-SHADOW_SLIDER=//fieldset//form/table//td[3]//td[contains(@class, 'rich-inslider-track-decor-2')]
-SHADOW_SLIDER_HANDLE=//fieldset//form/table//td[3]//div[contains(@class, 'rich-inslider-handler')]
-IMAGE=//fieldset[1]/div/img
+EXAMPLE_HEADER=jquery=fieldset > legend
+INPUT_TEXT=jquery=fieldset td:first input
+INPUT_COLOR=jquery=fieldset input[id$=colorPicker-hex]
+BUTTON_APPLY_COLOR=jquery=fieldset div.rich-color-picker-wrapper button[name=apply]
+SHADOW_SLIDER=jquery=fieldset td.rich-inslider-track-decor-2
+SHADOW_SLIDER_HANDLE=jquery=fieldset div.rich-inslider-handler
+IMAGE=jquery=fieldset img.rich-paint2D
15 years, 1 month
JBoss Rich Faces SVN: r15815 - branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-11-02 10:06:01 -0500 (Mon, 02 Nov 2009)
New Revision: 15815
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7914
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml 2009-11-02 14:30:33 UTC (rev 15814)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml 2009-11-02 15:06:01 UTC (rev 15815)
@@ -7,18 +7,19 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
-
+
<p>a4j:mediaOutput allows to generate images, video, sounds and other binary
resources defined by a user on-the-fly.
</p>
- <p><b>createContent</b> attribute references to the method that will be used
+ <p><b>createContent</b> attribute references to the managed Bean method that will be used
for content creating. The method accepts two parameters. The first parameter
has an OutputStream type. It is a reference to the steam that should be used for output.
The second parameter is a reference to a 'value' attribute of the component.
</p>
<p>
- <b>value</b> attribute references to data that can be used as input data for a content
- creator method. The data should be serializable because it is encoded to the URL
+ <b>value</b> attribute references to some managed Bean with data that can be
+ used as input data for a content
+ creator method. The object should be serializable because it is encoded to the URL
of the resource.
</p>
<p>
15 years, 1 month