JBoss Rich Faces SVN: r15844 - in root: cdk/trunk/plugins/generator and 30 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-11-05 15:37:23 -0500 (Thu, 05 Nov 2009)
New Revision: 15844
Modified:
root/cdk/trunk/plugins/annotations/pom.xml
root/cdk/trunk/plugins/generator/pom.xml
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml
root/examples-sandbox/trunk/backwardCompatibility/pom.xml
root/examples-sandbox/trunk/components/ajax/pom.xml
root/examples-sandbox/trunk/pom.xml
root/examples/trunk/components/repeater-demo/pom.xml
root/examples/trunk/pom.xml
root/framework/trunk/impl/pom.xml
root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/BaseCacheTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/codec/CodecTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FrameworkConfigurationTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/context/InitParametersTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/io/Test.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/javascript/JSMinTest.java
root/framework/trunk/impl/src/test/java/org/ajax4jsf/renderkit/RendererUtilsTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/component/UIRangedNumberInputTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/component/util/FormUtilTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/json/SerializationTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/json/Test.java
root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/CompositeRendererTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractCacheableResourceTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/resource/CacheableResourceImpl.java
root/framework/trunk/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
root/framework/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java
root/framework/trunk/legacy-tests/pom.xml
root/framework/trunk/pom.xml
root/framework/trunk/version-matrix/pom.xml
root/ui-sandbox/trunk/pom.xml
root/ui/trunk/components/core/pom.xml
root/ui/trunk/components/pom.xml
root/ui/trunk/pom.xml
root/ui/trunk/version-matrix/pom.xml
Log:
Environment update:
- JSF 2.0.1 -> 2.0.2
- EasyMock 2.5 -> 2.5.2
- richfaces-test-base -> org.jboss.test-jsf.*
Modified: root/cdk/trunk/plugins/annotations/pom.xml
===================================================================
--- root/cdk/trunk/plugins/annotations/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/cdk/trunk/plugins/annotations/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,7 +28,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/cdk/trunk/plugins/generator/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -125,7 +125,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
@@ -163,7 +163,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
- <version>2.5.1</version>
+ <version>2.5.2</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -40,7 +40,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: root/examples/trunk/components/repeater-demo/pom.xml
===================================================================
--- root/examples/trunk/components/repeater-demo/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/examples/trunk/components/repeater-demo/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -32,7 +32,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>mojarra-jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: root/examples/trunk/pom.xml
===================================================================
--- root/examples/trunk/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/examples/trunk/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -52,13 +52,13 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<!--scope>provided</scope-->
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<!--scope>provided</scope-->
</dependency>
<dependency>
@@ -110,13 +110,13 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: root/examples-sandbox/trunk/backwardCompatibility/pom.xml
===================================================================
--- root/examples-sandbox/trunk/backwardCompatibility/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/examples-sandbox/trunk/backwardCompatibility/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -121,13 +121,13 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Modified: root/examples-sandbox/trunk/components/ajax/pom.xml
===================================================================
--- root/examples-sandbox/trunk/components/ajax/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/examples-sandbox/trunk/components/ajax/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -65,12 +65,12 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
Modified: root/examples-sandbox/trunk/pom.xml
===================================================================
--- root/examples-sandbox/trunk/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/examples-sandbox/trunk/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -52,13 +52,13 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<!--scope>provided</scope-->
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<!--scope>provided</scope-->
</dependency>
<dependency>
Modified: root/framework/trunk/impl/pom.xml
===================================================================
--- root/framework/trunk/impl/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -128,10 +128,16 @@
<artifactId>richfaces-api</artifactId>
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>richfaces-test-base</artifactId>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<optional>true</optional>
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/BaseCacheTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/BaseCacheTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/BaseCacheTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -26,7 +26,7 @@
import java.util.Date;
import java.util.Map;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
/**
* @author Nick Belaevski
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/cache/LRUMapCacheTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -27,10 +27,9 @@
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.ajax4jsf.cache.lru.CacheEntry;
import org.ajax4jsf.cache.lru.CacheMap;
import org.ajax4jsf.cache.lru.LRUMapCache;
-import org.ajax4jsf.cache.lru.CacheEntry;
-
import org.junit.Assert;
import org.junit.Test;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/codec/CodecTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/codec/CodecTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/codec/CodecTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -24,9 +24,9 @@
package org.ajax4jsf.codec;
import org.ajax4jsf.util.base64.Codec;
+import org.jboss.test.faces.AbstractThreadedTest;
+import org.jboss.test.faces.AbstractThreadedTest.TestCaseRunnable;
-import org.richfaces.test.AbstractThreadedTest;
-
public class CodecTest extends AbstractThreadedTest {
Codec c;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -25,14 +25,11 @@
import java.io.IOException;
import java.io.InputStream;
-
import java.net.URL;
-
import java.util.Enumeration;
import java.util.Vector;
import javax.faces.webapp.FacesServlet;
-
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FrameworkConfigurationTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FrameworkConfigurationTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/FrameworkConfigurationTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -6,9 +6,8 @@
import javax.faces.context.ExternalContext;
import org.ajax4jsf.config.FrameworkConfiguration.InitParam;
+import org.jboss.test.faces.AbstractFacesTest;
-import org.richfaces.test.AbstractFacesTest;
-
/**
* @author Anton Belevich
*
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -24,10 +24,8 @@
package org.ajax4jsf.config;
import java.io.InputStream;
-
import java.net.MalformedURLException;
import java.net.URL;
-
import java.util.Enumeration;
import java.util.Set;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -24,7 +24,6 @@
package org.ajax4jsf.config;
import java.io.InputStream;
-
import java.util.List;
import junit.framework.TestCase;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,7 +28,6 @@
import junit.framework.TestCase;
import org.ajax4jsf.config.WebappHandler.ServletMappingHandler;
-
import org.xml.sax.ContentHandler;
/**
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/context/InitParametersTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/context/InitParametersTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/context/InitParametersTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -6,7 +6,7 @@
import javax.faces.FacesException;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
/**
* @author asmirnov
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/io/Test.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/io/Test.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/io/Test.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -23,14 +23,14 @@
package org.ajax4jsf.io;
-import org.junit.Ignore;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
+import org.junit.Ignore;
+
@Ignore
public final class Test {
private static final int ARRAY_LENGTH = 27;
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/javascript/JSMinTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/javascript/JSMinTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/javascript/JSMinTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -26,12 +26,12 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
+import junit.framework.TestCase;
+
import org.ajax4jsf.javascript.JSMin.UnterminatedCommentException;
import org.ajax4jsf.javascript.JSMin.UnterminatedRegExpLiteralException;
import org.ajax4jsf.javascript.JSMin.UnterminatedStringLiteralException;
-import junit.framework.TestCase;
-
/**
* @author asmirnov
*
Modified: root/framework/trunk/impl/src/test/java/org/ajax4jsf/renderkit/RendererUtilsTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/ajax4jsf/renderkit/RendererUtilsTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/ajax4jsf/renderkit/RendererUtilsTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -29,11 +29,11 @@
import java.util.List;
import java.util.Map;
+import junit.framework.TestCase;
+
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.renderkit.RendererUtils.ScriptHashVariableWrapper;
-import junit.framework.TestCase;
-
/**
* @author Nick Belaevski
* @since 3.3.2
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/component/UIRangedNumberInputTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/component/UIRangedNumberInputTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/component/UIRangedNumberInputTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -23,7 +23,7 @@
package org.richfaces.component;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
public class UIRangedNumberInputTest extends AbstractFacesTest {
private UIRangedNumberInput input;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/component/nsutils/NSUtilsTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,7 +28,7 @@
import javax.faces.component.UIInput;
import javax.faces.context.ResponseWriter;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
public class NSUtilsTest extends AbstractFacesTest {
public void setUp() throws Exception {
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/component/util/FormUtilTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/component/util/FormUtilTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/component/util/FormUtilTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,8 +28,8 @@
import javax.faces.component.UIOutput;
import javax.faces.component.UIViewRoot;
+import org.jboss.test.faces.AbstractFacesTest;
import org.richfaces.component.EnclosingFormRequiredException;
-import org.richfaces.test.AbstractFacesTest;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -26,7 +26,6 @@
import static org.junit.Assert.fail;
import java.net.URL;
-
import java.util.Iterator;
import org.junit.After;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/json/SerializationTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/json/SerializationTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/json/SerializationTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,7 +28,6 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-
import java.util.Iterator;
import junit.framework.TestCase;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/json/Test.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/json/Test.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/json/Test.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -23,14 +23,13 @@
package org.richfaces.json;
-import junit.framework.TestCase;
-
import java.io.StringWriter;
-
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
+import junit.framework.TestCase;
+
import org.junit.Ignore;
/**
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/CompositeRendererTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/CompositeRendererTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/CompositeRendererTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -2,7 +2,6 @@
import java.io.IOException;
import java.io.StringWriter;
-
import java.util.Arrays;
import java.util.Map;
@@ -13,7 +12,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
public class CompositeRendererTest extends AbstractFacesTest {
private CompositeRenderer compositeRenderer;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -30,7 +30,7 @@
import javax.faces.component.html.HtmlPanelGroup;
import javax.faces.context.ResponseWriter;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
/**
* Created 26.10.2007
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/renderkit/TemplateUtilTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -24,7 +24,6 @@
package org.richfaces.renderkit;
import java.io.StringReader;
-
import java.util.List;
import junit.framework.TestCase;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -25,10 +25,8 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-
import java.net.URL;
import java.net.URLConnection;
-
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
@@ -39,8 +37,7 @@
import javax.faces.context.FacesContext;
import org.easymock.EasyMock;
-
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
import org.richfaces.util.Util;
/**
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractCacheableResourceTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractCacheableResourceTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/resource/AbstractCacheableResourceTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -25,11 +25,8 @@
import java.io.IOException;
import java.io.InputStream;
-
import java.net.URL;
-
import java.text.SimpleDateFormat;
-
import java.util.Collections;
import java.util.Date;
import java.util.Locale;
@@ -40,9 +37,8 @@
import org.easymock.IAnswer;
import org.easymock.classextension.EasyMock;
+import org.jboss.test.faces.AbstractFacesTest;
-import org.richfaces.test.AbstractFacesTest;
-
/**
* @author Nick Belaevski
* @since 4.0
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/resource/CacheableResourceImpl.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/resource/CacheableResourceImpl.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/resource/CacheableResourceImpl.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -26,7 +26,6 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
-
import java.util.Date;
import java.util.Map;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/resource/CachedResourceImplTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -28,9 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-
import java.net.URL;
-
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
@@ -43,7 +41,7 @@
import javax.faces.application.Resource;
import javax.faces.context.FacesContext;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
/**
* @author Nick Belaevski
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -24,21 +24,17 @@
package org.richfaces.resource;
import java.io.File;
-
import java.net.URL;
-
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import javax.faces.application.ResourceHandler;
-
import javax.servlet.http.HttpServletResponse;
import org.easymock.classextension.EasyMock;
-
-import org.richfaces.test.AbstractFacesTest;
-import org.richfaces.test.LocalWebClient;
+import org.jboss.test.faces.AbstractFacesTest;
+import org.jboss.test.faces.htmlunit.LocalWebClient;
import org.richfaces.util.Util;
import com.gargoylesoftware.htmlunit.WebRequestSettings;
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java 2009-11-05 20:37:23 UTC (rev 15844)
@@ -26,13 +26,12 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
-
import java.util.HashMap;
import java.util.Map;
import javax.faces.FacesException;
-import org.richfaces.test.AbstractFacesTest;
+import org.jboss.test.faces.AbstractFacesTest;
/**
* Test for Skin/skin factory methods.
Modified: root/framework/trunk/legacy-tests/pom.xml
===================================================================
--- root/framework/trunk/legacy-tests/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/legacy-tests/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -47,7 +47,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
Modified: root/framework/trunk/pom.xml
===================================================================
--- root/framework/trunk/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -30,11 +30,15 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: root/framework/trunk/version-matrix/pom.xml
===================================================================
--- root/framework/trunk/version-matrix/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/framework/trunk/version-matrix/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -161,12 +161,12 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
@@ -254,7 +254,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
- <version>2.5</version>
+ <version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
Modified: root/ui/trunk/components/core/pom.xml
===================================================================
--- root/ui/trunk/components/core/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/ui/trunk/components/core/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -39,12 +39,17 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<scope>test</scope>
Modified: root/ui/trunk/components/pom.xml
===================================================================
--- root/ui/trunk/components/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/ui/trunk/components/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -21,12 +21,16 @@
<artifactId>richfaces-api</artifactId>
<version>${framework.version}</version>
</dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <version>${framework.version}</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies-->
<modules>
<module>core</module>
Modified: root/ui/trunk/pom.xml
===================================================================
--- root/ui/trunk/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/ui/trunk/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -77,10 +77,15 @@
<artifactId>richfaces-api</artifactId>
</dependency>
<dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <scope> test </scope>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<modules>
Modified: root/ui/trunk/version-matrix/pom.xml
===================================================================
--- root/ui/trunk/version-matrix/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/ui/trunk/version-matrix/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -94,12 +94,17 @@
<artifactId>richfaces-impl</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
<dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
@@ -107,12 +112,12 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</dependency>
<!-- Dependencies of JSF 2.0 -->
Modified: root/ui-sandbox/trunk/pom.xml
===================================================================
--- root/ui-sandbox/trunk/pom.xml 2009-11-05 17:06:52 UTC (rev 15843)
+++ root/ui-sandbox/trunk/pom.xml 2009-11-05 20:37:23 UTC (rev 15844)
@@ -75,15 +75,20 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-test-base</artifactId>
- <scope> test </scope>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<modules>
- <module>components</module>
+ <module>components</module>
</modules>
</project>
\ No newline at end of file
15 years, 1 month
JBoss Rich Faces SVN: r15843 - root/examples-sandbox/trunk/components/tables/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 12:06:52 -0500 (Thu, 05 Nov 2009)
New Revision: 15843
Modified:
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Log:
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 17:00:48 UTC (rev 15842)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 17:06:52 UTC (rev 15843)
@@ -12,7 +12,7 @@
<h:body>
<h:form id="form1">
- <rich:simpleDataTable var="record" value="#{dataBean.employeeList}" rows="20">
+ <rich:dataTable var="record" value="#{dataBean.employeeList}" rows="20">
<f:facet name="caption">
<h:outputText id="captioFacet1" value="Caption Facet" />
</f:facet>
@@ -59,7 +59,7 @@
<h:outputText id="footerFacet1" value="Footer Facet" />
</f:facet>
- </rich:simpleDataTable>
+ </rich:dataTable>
</h:form>
</h:body>
15 years, 1 month
JBoss Rich Faces SVN: r15842 - in root/ui-sandbox/trunk/components/tables/ui/src/main: java/org/richfaces/component/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 12:00:48 -0500 (Thu, 05 Nov 2009)
New Revision: 15842
Added:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlDataTable.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/datatable.js
Removed:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISimpleDataTable.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlSimpleDataTable.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/simple-datatable.js
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/FixedChildrenIterator.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/SubtableFixedChildrenIterator.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTable.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.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/component/html/HtmlColumnGroup.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/ElementEncodeListener.java
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/table.css
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml
Log:
rename simpleDataTable -> dataTable
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/DataIterator.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -32,7 +32,7 @@
private Iterator<UIComponent> childrenIterator;
- public DataIterator(UIDataTable dataTable) {
+ public DataIterator(UIDataTableBase dataTable) {
this.childrenIterator = dataTable.getChildren().iterator();
this.facetsIterator = dataTable.getFacets().values().iterator();
}
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/FixedChildrenIterator.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -29,7 +29,7 @@
private Iterator<UIComponent> currentColumnIterator;
- public FixedChildrenIterator(UIDataTable dataTable) {
+ public FixedChildrenIterator(UIDataTableBase dataTable) {
super(dataTable);
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/SubtableFixedChildrenIterator.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/SubtableFixedChildrenIterator.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/SubtableFixedChildrenIterator.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -28,7 +28,7 @@
*/
public class SubtableFixedChildrenIterator extends FixedChildrenIterator {
- public SubtableFixedChildrenIterator(UIDataTable dataTable) {
+ public SubtableFixedChildrenIterator(UIDataTableBase dataTable) {
super(dataTable);
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTable.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,41 +1,21 @@
package org.richfaces.component;
-import java.util.Iterator;
+/**
+ * @author Anton Belevich
+ *
+ */
-import javax.faces.component.UIComponent;
-
-public abstract class UIDataTable extends UISequence implements Row {
-
- public Iterator<UIComponent> columns() {
- return new ColumnsIterator(this);
- }
+public abstract class UIDataTable extends UIDataTableBase {
- @Override
- protected Iterator<UIComponent> fixedChildren() {
- return new FixedChildrenIterator(this);
+ public String getCellSkinClass() {
+ return "rich-table-cell";
}
- @Override
- protected Iterator<UIComponent> dataChildren() {
-
- return new DataIterator(this);
+ public String getRowSkinClass() {
+ return "rich-table-row";
}
- public UIComponent getHeader() {
- return getFacet("header");
- }
-
- public UIComponent getFooter() {
- return getFacet("footer");
- }
-
- public UIComponent getCaption() {
- return getFacet("caption");
+ public String getFirstRowSkinClass() {
+ return "rich-table-firstrow";
}
-
- @Override
- public boolean getRendersChildren() {
- return true;
- }
-
-}
+}
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java (rev 0)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -0,0 +1,41 @@
+package org.richfaces.component;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+
+public abstract class UIDataTableBase extends UISequence implements Row {
+
+ public Iterator<UIComponent> columns() {
+ return new ColumnsIterator(this);
+ }
+
+ @Override
+ protected Iterator<UIComponent> fixedChildren() {
+ return new FixedChildrenIterator(this);
+ }
+
+ @Override
+ protected Iterator<UIComponent> dataChildren() {
+
+ return new DataIterator(this);
+ }
+
+ public UIComponent getHeader() {
+ return getFacet("header");
+ }
+
+ public UIComponent getFooter() {
+ return getFacet("footer");
+ }
+
+ public UIComponent getCaption() {
+ return getFacet("caption");
+ }
+
+ @Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,9 +1,8 @@
package org.richfaces.component;
-
/**
* @author Anton Belevich
*
*/
-public abstract class UIExtendedDataTable extends UISimpleDataTable {
+public abstract class UIExtendedDataTable extends UIDataTable {
}
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISimpleDataTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISimpleDataTable.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISimpleDataTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,25 +0,0 @@
-package org.richfaces.component;
-
-
-
-
-
-/**
- * @author Anton Belevich
- *
- */
-
-public abstract class UISimpleDataTable extends UIDataTable {
-
- public String getCellSkinClass() {
- return "rich-table-cell";
- }
-
- public String getRowSkinClass() {
- return "rich-table-row";
- }
-
- public String getFirstRowSkinClass() {
- return "rich-table-firstrow";
- }
-}
\ No newline at end of file
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -33,7 +33,7 @@
* JSF component class
*
*/
-public abstract class UISubTable extends UIDataTable implements Row, Column {
+public abstract class UISubTable extends UIDataTableBase implements Row, Column {
public static final String COMPONENT_TYPE = "org.richfaces.SubTable";
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumnGroup.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,7 +1,6 @@
package org.richfaces.component.html;
import javax.el.MethodExpression;
-import javax.faces.context.FacesContext;
import org.richfaces.component.UIColumnGroup;
import org.richfaces.model.Ordering;
Added: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlDataTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlDataTable.java (rev 0)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlDataTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -0,0 +1,19 @@
+package org.richfaces.component.html;
+
+import org.richfaces.component.UIDataTable;
+
+public class HtmlDataTable extends UIDataTable {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.DataTable";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.DataTable";
+
+ public HtmlDataTable() {
+ setRendererType("org.richfaces.DataTableRenderer");
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+}
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlSimpleDataTable.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlSimpleDataTable.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlSimpleDataTable.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,19 +0,0 @@
-package org.richfaces.component.html;
-
-import org.richfaces.component.UISimpleDataTable;
-
-public class HtmlSimpleDataTable extends UISimpleDataTable {
-
- public static final String COMPONENT_TYPE = "org.richfaces.SimpleDataTable";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.SimpleDataTable";
-
- public HtmlSimpleDataTable() {
- setRendererType("org.richfaces.SimpleDataTableRenderer");
- }
-
- @Override
- public String getFamily() {
- return COMPONENT_FAMILY;
- }
-}
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -29,7 +29,7 @@
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.renderkit.RendererBase;
import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTable;
+import org.richfaces.component.UIDataTableBase;
/**
* @author shura
@@ -67,7 +67,7 @@
}
//TODO remove
- public void encodeRows(FacesContext facesContext, UIDataTable table) throws IOException {
+ public void encodeRows(FacesContext facesContext, UIDataTableBase table) throws IOException {
RowHolder rowHolder = new RowHolder(table);
encodeRows(facesContext, table, rowHolder);
}
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -9,7 +9,7 @@
import org.richfaces.component.Column;
import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTable;
+import org.richfaces.component.UIDataTableBase;
@ResourceDependencies({
@@ -19,7 +19,7 @@
})
public abstract class AbstractTableRenderer extends AbstractRowsRenderer {
- public boolean isColumnFacetPresent(UIDataTable table, String facetName) {
+ public boolean isColumnFacetPresent(UIDataTableBase table, String facetName) {
Iterator<UIComponent> columns = table.columns();
boolean result = false;
while(columns.hasNext() && !result) {
@@ -37,7 +37,7 @@
* @return true if specified attribute should generate header on the table
*/
//TODO nick - rename this method
- public boolean isHeaderFactoryColumnAttributePresent(UIDataTable table,String attributeName) {
+ public boolean isHeaderFactoryColumnAttributePresent(UIDataTableBase table,String attributeName) {
Iterator<UIComponent> columns = table.columns();
boolean result = false;
while (columns.hasNext() && !result) {
@@ -47,14 +47,14 @@
return result;
}
- protected boolean isEncodeHeaders(UIDataTable table) {
+ protected boolean isEncodeHeaders(UIDataTableBase table) {
return isColumnFacetPresent(table, "header") ||
isHeaderFactoryColumnAttributePresent(table, "sortBy") ||
isHeaderFactoryColumnAttributePresent(table, "comparator") ||
isHeaderFactoryColumnAttributePresent(table, "filterBy");
}
- protected int getColumnsCount(UIDataTable table) {
+ protected int getColumnsCount(UIDataTableBase table) {
// check for exact value in component
Integer span = (Integer) table.getAttributes().get("columns");
int count = (null != span && span.intValue() != Integer.MIN_VALUE) ? span.intValue() : calculateRowColumns(table.columns());
Added: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java (rev 0)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -0,0 +1,489 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.UIDataTable;
+
+@ResourceDependencies({
+ @ResourceDependency(name = "datatable.js"),
+ @ResourceDependency(name = "table.css")
+})
+public class DataTableRenderer extends AbstractTableRenderer implements ElementEncodeListener{
+
+
+ protected void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
+
+ Object key = dataTable.getRowKey();
+ dataTable.captureOrigValue(context);
+ dataTable.setRowKey(context, null);
+
+ encodeCaption(writer, context, dataTable);
+
+ //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", dataTable);
+ int columns = getColumnsCount(dataTable);
+
+ writer.writeAttribute(HTML.SPAN_ELEM, String.valueOf(columns), null);
+ String columnsWidth = (String) dataTable.getAttributes().get("columnsWidth");
+
+ if (null != columnsWidth) {
+ String[] widths = columnsWidth.split(",");
+ for (int i = 0; i < widths.length; i++) {
+ writer.startElement("col", dataTable);
+ writer.writeAttribute("width", widths[i], null);
+ writer.endElement("col");
+ }
+ }
+ writer.endElement("colgroup");
+
+ encodeHeader(writer, context, dataTable, columns);
+ encodeFooter(writer, context, dataTable, columns);
+
+ dataTable.setRowKey(context, key);
+ dataTable.restoreOrigValue(context);
+
+ }
+
+ public void encodeRows(FacesContext context, UIDataTableBase dataTable) throws IOException {
+
+ RowHolder holder = new RowHolder(dataTable);
+ holder.setCellClass(dataTable.getCellSkinClass());
+ holder.setRowClass(dataTable.getRowSkinClass());
+ holder.setFirstRowClass(dataTable.getFirstRowSkinClass());
+ holder.setHeaderRow(false);
+
+ encodeRows(context, dataTable, holder);
+ }
+
+ public void encodeRow(FacesContext context, RowHolder rowHolder) throws IOException {
+
+ boolean rowStart = true;
+ int processCell = 0;
+
+ Row row = rowHolder.getRow();
+ int processRow = rowHolder.getCurrentRow();
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ Iterator<UIComponent> iterator = row.columns();
+ while(iterator.hasNext()) {
+
+ UIComponent child = iterator.next();
+ if(child instanceof Row) {
+
+ Row childRow = (Row)child;
+ RowHolder childRowHolder = new RowHolder(childRow);
+ childRowHolder.setCurrentRow(processRow);
+ childRowHolder.setCellElement(rowHolder.getCellElement());
+
+ if(rowHolder.isHeaderRow()) {
+ childRowHolder.setRowClass(rowHolder.getRowClass());
+ childRowHolder.setFirstRowClass(rowHolder.getFirstRowClass());
+ childRowHolder.setCellClass(rowHolder.getCellClass());
+ } else {
+ childRowHolder.setRowClass(childRow.getRowSkinClass());
+ childRowHolder.setFirstRowClass(childRow.getFirstRowSkinClass());
+ childRowHolder.setCellClass(childRow.getCellSkinClass());
+ }
+ childRowHolder.setHeaderRow(rowHolder.isHeaderRow());
+ encodeRows(context, childRow, childRowHolder);
+
+ } else if(child instanceof UIColumn) {
+
+ if(child instanceof org.richfaces.component.UIColumn) {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)child;
+ if(column.isBreakBefore() && processCell !=0) {
+ encodeRowEnd(writer, context, column);
+ rowHolder.nextRow();
+ rowStart = true;
+ }
+ }
+
+ if(rowStart) {
+
+ if(processRow == 0) {
+ encodeFirstRowStart(writer, context, child, rowHolder);
+ } else {
+ encodeRowStart(writer, context, child, rowHolder);
+ }
+
+ rowStart = false;
+ }
+
+ encodeCellStart(writer, context, child, rowHolder);
+ encodeCellEnd(writer, context, child);
+
+ if(!iterator.hasNext()) {
+ if(processRow == 0) {
+ encodeFirstRowEnd(writer, context, child);
+ } else {
+ encodeRowEnd(writer, context, child);
+ }
+ }
+ processCell++;
+ }
+
+ }
+ }
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ if(!shouldProceed(component)) {
+ return;
+ }
+ UIDataTableBase dataTable = (UIDataTableBase)component;
+ encodeTableStart(writer,context, dataTable);
+ encodeTableStructure(writer, context, dataTable);
+ }
+
+ @Override
+ protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+
+ if(!shouldProceed(component)) {
+ return;
+ }
+
+ UIDataTableBase dataTable = (UIDataTableBase)component;
+ encodeTableBodyStart(writer, context, dataTable);
+ encodeRows(context, dataTable);
+ encodeTableBodyEnd(writer, context, dataTable);
+
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+
+ if(!shouldProceed(component)) {
+ return;
+ }
+
+ UIDataTableBase dataTable = (UIDataTableBase)component;
+ encodeTableEnd(writer, context, dataTable);
+ }
+
+ protected boolean shouldProceed(UIComponent component) {
+ return (component instanceof UIDataTableBase);
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIDataTable.class;
+ }
+
+ public void encodeCellEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ writer.endElement(HTML.TD_ELEM);
+ }
+
+ public void encodeCellStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
+ writer.startElement(HTML.TD_ELEM, component);
+ String cellClass = holder.getCellClass();
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, cellClass);
+
+ if(component instanceof org.richfaces.component.UIColumn) {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)component;
+
+ int rowspan = column.getRowspan();
+ if(rowspan != Integer.MIN_VALUE) {
+ writer.writeAttribute("rowspan", Integer.valueOf(rowspan), null);
+ }
+
+ int colspan = column.getColspan();
+ if(colspan != Integer.MIN_VALUE) {
+ writer.writeAttribute("colspan", Integer.valueOf(colspan), null);
+ }
+ }
+ renderChildren(context, component);
+ }
+
+ public void encodeFirstRowEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+
+ public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
+ writer.startElement(HTML.TR_ELEMENT, component);
+ String styleClass = holder.getFirstRowClass() + " " + holder.getRowClass();
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
+ }
+
+ public void encodeRowEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+
+ public void encodeRowStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
+ writer.startElement(HTML.TR_ELEMENT, component);
+ String styleClass = holder.getRowClass();
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
+ }
+
+ public void encodeTableBodyEnd(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
+ writer.endElement(HTML.TABLE_ELEMENT);
+ }
+
+ public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
+ writer.startElement(HTML.BODY_ELEMENT, component);
+ }
+
+ public void encodeTableEnd(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
+ writer.endElement(HTML.BODY_ELEMENT);
+ }
+
+ public void encodeTableStart(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
+ writer.startElement(HTML.TABLE_ELEMENT, component);
+ String styleClass = getTableSkinClass();
+ encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
+ }
+
+ public void encodeCaption(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
+
+ UIComponent caption = dataTable.getCaption();
+
+ if (caption == null) {
+ return;
+ }
+
+ if(!caption.isRendered()) {
+ return;
+ }
+
+ writer.startElement(HTML.CAPTION_ELEMENT, dataTable);
+
+ String captionClass = (String) dataTable.getAttributes().get("captionClass");
+ String captionSkinClass = getCaptionSkinClass();
+ captionClass = captionClass != null ? captionClass + " " + captionClass : captionSkinClass;
+
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, captionClass, "captionClass");
+
+ String captionStyle = (String) dataTable.getAttributes().get("captionStyle");
+
+ if (captionStyle != null && captionStyle.trim().length()!=0) {
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, captionStyle, "captionStyle");
+ }
+
+ renderChild(context, caption);
+
+ writer.endElement(HTML.CAPTION_ELEMENT);
+ }
+
+ public void encodeFooter(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable, int columns) throws IOException {
+
+ Iterator<UIComponent> tableColumns = dataTable.columns();
+
+ UIComponent footer = dataTable.getFooter();
+
+ boolean columnFacetPresent = isColumnFacetPresent(dataTable, "footer");
+
+ if ((footer != null && footer.isRendered()) || columnFacetPresent) {
+
+ writer.startElement(HTML.TFOOT_ELEMENT, dataTable);
+ String footerClass = (String) dataTable.getAttributes().get("footerClass");
+
+ if (columnFacetPresent) {
+ writer.startElement(HTML.TR_ELEMENT, dataTable);
+
+ encodeStyleClass(writer, context, dataTable, "footerClass", "rich-table-subfooter");
+ //TODO nick - use "th" instead of "td"?
+ //TODO nick - rename method "encodeHeaderFacets"
+ encodeHeaderFacets(context, writer, tableColumns, "rich-table-subfootercell",
+ footerClass, "footer", HTML.TD_ELEM, columns);
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+
+
+ if (footer != null && footer.isRendered()) {
+ //TODO nick - use "th" instead of "td"?
+ //TODO nick - rename method "encodeTableHeaderFacet"
+ encodeTableHeaderFacet(context, columns, writer, footer,
+ "rich-table-footer",
+ "rich-table-footer-continue",
+ "rich-table-footercell",
+ footerClass, HTML.TH_ELEM);
+ }
+
+ writer.endElement(HTML.TFOOT_ELEMENT);
+ }
+ }
+
+ public void encodeHeader(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable, int columns) throws IOException {
+
+ UIComponent header = dataTable.getHeader();
+ boolean isEncodeHeaders = isEncodeHeaders(dataTable);
+
+ if ((header != null && header.isRendered()) || isEncodeHeaders) {
+
+ writer.startElement(HTML.THEAD_ELEMENT, dataTable);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-table-thead", null);
+
+ String headerClass = (String) dataTable.getAttributes().get("headerClass");
+
+ if (header != null && header.isRendered()) {
+ encodeTableHeaderFacet(context, columns, writer, header,
+ "rich-table-header",
+ //TODO nick - rename classes!!!
+ "rich-table-header-continue",
+ "rich-table-headercell",
+ headerClass, HTML.TH_ELEM);
+ }
+
+ if (isEncodeHeaders) {
+ writer.startElement(HTML.TR_ELEMENT, dataTable);
+ encodeStyleClass(writer, context, dataTable, "headerClass", "rich-table-subheader");
+ encodeHeaderFacets(context, writer, dataTable.columns(), "rich-table-subheadercell", headerClass, "header", HTML.TH_ELEM, columns);
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+
+ writer.endElement(HTML.THEAD_ELEMENT);
+ }
+ }
+
+ protected void encodeTableHeaderFacet(FacesContext context, int columns, ResponseWriter writer, UIComponent footer,
+ String skinFirstRowClass, String skinRowClass, String skinCellClass, String footerClass, String element)
+ throws IOException {
+
+ if(footer instanceof Row) {
+ Row row = (Row)footer;
+
+ RowHolder holder = new RowHolder(row);
+ holder.setCellElement(element);
+ holder.setFirstRowClass(skinFirstRowClass);
+ holder.setRowClass(skinRowClass);
+ holder.setCellClass(skinCellClass);
+ holder.resetCurrentRow();
+ holder.setHeaderRow(true);
+
+ encodeRows(context, row, holder);
+
+ } else {
+ writer.startElement(HTML.TR_ELEMENT, footer);
+
+ String rowClass = skinFirstRowClass;
+ String cellClass = skinCellClass;
+ if(footerClass != null && footerClass.trim().length()!=0) {
+ rowClass = rowClass + " " + footerClass;
+ cellClass = cellClass + " " + footerClass;
+ }
+
+ encodeStyleClass(writer, context, footer, null, rowClass);
+
+ writer.startElement(element, footer);
+
+ encodeStyleClass(writer, context, footer, null, cellClass);
+
+ if(columns > 0) {
+ writer.writeAttribute("colspan", String.valueOf(columns), null);
+ }
+ writer.writeAttribute("scope", "colgroup", null);
+
+ renderChild(context, footer);
+
+ writer.endElement(element);
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+ }
+
+ protected void encodeHeaderFacets(FacesContext context, ResponseWriter writer, Iterator<UIComponent> headers,
+ String skinCellClass, String headerClass, String facetName, String element, int colCount) throws IOException {
+
+ int tColCount = 0;
+
+ while (headers.hasNext()) {
+ UIComponent column = headers.next();
+ if (!column.isRendered()) {
+ continue;
+ }
+
+ Integer colspan = (Integer) column.getAttributes().get("colspan");
+ if (colspan != null && colspan.intValue() > 0) {
+ tColCount += colspan.intValue();
+ } else {
+ tColCount++;
+ }
+
+ if (tColCount > colCount) {
+ break;
+ }
+
+ String classAttribute = facetName + "Class";
+
+ String columnHeaderClass = (String) column.getAttributes().get(classAttribute);
+
+ String styleClass = skinCellClass;
+ if(headerClass != null && headerClass.trim().length() != 0) {
+ styleClass = styleClass + " " + headerClass;
+ }
+
+ if(columnHeaderClass != null && columnHeaderClass.trim().length() != 0) {
+ styleClass = styleClass + " " + columnHeaderClass;
+ }
+
+
+ writer.startElement(element, column);
+
+ encodeStyleClass(writer, context, column, null, styleClass);
+
+ writer.writeAttribute("scope", "col", null);
+ getUtils().encodeAttribute(context, column, "colspan");
+
+ UIComponent facet = column.getFacet(facetName);
+ if (facet != null && facet.isRendered()) {
+ renderChild(context, facet);
+ }
+
+ writer.endElement(element);
+ }
+ }
+
+
+ protected void encodeStyleClass(ResponseWriter writer, FacesContext context, UIComponent component , String styleClassAttribute, String styleClass) throws IOException {
+ boolean isEmpty = isEmpty(component, styleClassAttribute);
+ if( isEmpty && !(styleClass != null && styleClass.trim().length() != 0)) {
+ return;
+ }
+
+ String componentStyleClass = isEmpty ? styleClass : styleClass + " " + component.getAttributes().get(styleClassAttribute);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, componentStyleClass, null);
+ }
+
+ protected boolean isEmpty(UIComponent component, String attribute) {
+ if(attribute == null) {
+ return true;
+ }
+ String value = (String) component.getAttributes().get(attribute);
+ return !(value != null && value.trim().length()!=0);
+ }
+
+ protected void encodeStyle(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ String style = (String)component.getAttributes().get(HTML.STYLE_ATTRIBUTE);
+ if(!isEmptyStyle(style)) {
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
+ }
+ }
+
+ protected boolean isEmptyStyle(String style) {
+ return !((style != null) && (style.trim().length()!=0));
+ }
+
+ protected String getTableSkinClass() {
+ return "rich-table";
+ }
+
+ protected String getTableHeadSkinClass() {
+ return "rich-table-head";
+ }
+
+ protected String getCaptionSkinClass() {
+ return "rich-table-caption";
+ }
+
+}
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-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ElementEncodeListener.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -6,7 +6,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.richfaces.component.UIDataTable;
+import org.richfaces.component.UIDataTableBase;
public interface ElementEncodeListener {
@@ -26,18 +26,18 @@
public void encodeFirstRowEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException;
- public void encodeTableStart(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException;
+ public void encodeTableStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException;
- public void encodeTableEnd(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException;
+ public void encodeTableEnd(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException;
- public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException;
+ public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException;
- public void encodeTableBodyEnd(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException;
+ public void encodeTableBodyEnd(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException;
- public void encodeCaption(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException;
+ public void encodeCaption(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException;
- public void encodeHeader(ResponseWriter writer, FacesContext context, UIDataTable dataTable, int columns) throws IOException;
+ public void encodeHeader(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable, int columns) throws IOException;
- public void encodeFooter(ResponseWriter writer, FacesContext context, UIDataTable dataTable, int columns) throws IOException;
+ public void encodeFooter(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable, int columns) throws IOException;
}
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,487 +0,0 @@
-package org.richfaces.renderkit;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTable;
-import org.richfaces.component.UISimpleDataTable;
-
-@ResourceDependencies({
- @ResourceDependency(name = "simple-datatable.js"),
- @ResourceDependency(name = "simple-table.css")
-})
-public class SimpleDataTableRenderer extends AbstractTableRenderer implements ElementEncodeListener{
-
-
- protected void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException {
-
- Object key = dataTable.getRowKey();
- dataTable.captureOrigValue(context);
- dataTable.setRowKey(context, null);
-
- encodeCaption(writer, context, dataTable);
-
- //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", dataTable);
- int columns = getColumnsCount(dataTable);
-
- writer.writeAttribute(HTML.SPAN_ELEM, String.valueOf(columns), null);
- String columnsWidth = (String) dataTable.getAttributes().get("columnsWidth");
-
- if (null != columnsWidth) {
- String[] widths = columnsWidth.split(",");
- for (int i = 0; i < widths.length; i++) {
- writer.startElement("col", dataTable);
- writer.writeAttribute("width", widths[i], null);
- writer.endElement("col");
- }
- }
- writer.endElement("colgroup");
-
- encodeHeader(writer, context, dataTable, columns);
- encodeFooter(writer, context, dataTable, columns);
-
- dataTable.setRowKey(context, key);
- dataTable.restoreOrigValue(context);
-
- }
-
- public void encodeRows(FacesContext context, UIDataTable dataTable) throws IOException {
-
- RowHolder holder = new RowHolder(dataTable);
- holder.setCellClass(dataTable.getCellSkinClass());
- holder.setRowClass(dataTable.getRowSkinClass());
- holder.setFirstRowClass(dataTable.getFirstRowSkinClass());
- holder.setHeaderRow(false);
-
- encodeRows(context, dataTable, holder);
- }
-
- public void encodeRow(FacesContext context, RowHolder rowHolder) throws IOException {
-
- boolean rowStart = true;
- int processCell = 0;
-
- Row row = rowHolder.getRow();
- int processRow = rowHolder.getCurrentRow();
-
- ResponseWriter writer = context.getResponseWriter();
-
- Iterator<UIComponent> iterator = row.columns();
- while(iterator.hasNext()) {
-
- UIComponent child = iterator.next();
- if(child instanceof Row) {
-
- Row childRow = (Row)child;
- RowHolder childRowHolder = new RowHolder(childRow);
- childRowHolder.setCurrentRow(processRow);
- childRowHolder.setCellElement(rowHolder.getCellElement());
-
- if(rowHolder.isHeaderRow()) {
- childRowHolder.setRowClass(rowHolder.getRowClass());
- childRowHolder.setFirstRowClass(rowHolder.getFirstRowClass());
- childRowHolder.setCellClass(rowHolder.getCellClass());
- } else {
- childRowHolder.setRowClass(childRow.getRowSkinClass());
- childRowHolder.setFirstRowClass(childRow.getFirstRowSkinClass());
- childRowHolder.setCellClass(childRow.getCellSkinClass());
- }
- childRowHolder.setHeaderRow(rowHolder.isHeaderRow());
- encodeRows(context, childRow, childRowHolder);
-
- } else if(child instanceof UIColumn) {
-
- if(child instanceof org.richfaces.component.UIColumn) {
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)child;
- if(column.isBreakBefore() && processCell !=0) {
- encodeRowEnd(writer, context, column);
- rowHolder.nextRow();
- rowStart = true;
- }
- }
-
- if(rowStart) {
-
- if(processRow == 0) {
- encodeFirstRowStart(writer, context, child, rowHolder);
- } else {
- encodeRowStart(writer, context, child, rowHolder);
- }
-
- rowStart = false;
- }
-
- encodeCellStart(writer, context, child, rowHolder);
- encodeCellEnd(writer, context, child);
-
- if(!iterator.hasNext()) {
- if(processRow == 0) {
- encodeFirstRowEnd(writer, context, child);
- } else {
- encodeRowEnd(writer, context, child);
- }
- }
- processCell++;
- }
-
- }
- }
-
- @Override
- protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- if(!shouldProceed(component)) {
- return;
- }
- UIDataTable dataTable = (UIDataTable)component;
- encodeTableStart(writer,context, dataTable);
- encodeTableStructure(writer, context, dataTable);
- }
-
- @Override
- protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
-
- if(!shouldProceed(component)) {
- return;
- }
-
- UIDataTable dataTable = (UIDataTable)component;
- encodeTableBodyStart(writer, context, dataTable);
- encodeRows(context, dataTable);
- encodeTableBodyEnd(writer, context, dataTable);
-
- }
-
- @Override
- protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
-
- if(!shouldProceed(component)) {
- return;
- }
-
- UIDataTable dataTable = (UIDataTable)component;
- encodeTableEnd(writer, context, dataTable);
- }
-
- protected boolean shouldProceed(UIComponent component) {
- return (component instanceof UIDataTable);
- }
-
- @Override
- protected Class<? extends UIComponent> getComponentClass() {
- return UISimpleDataTable.class;
- }
-
- public void encodeCellEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- writer.endElement(HTML.TD_ELEM);
- }
-
- public void encodeCellStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
- writer.startElement(HTML.TD_ELEM, component);
- String cellClass = holder.getCellClass();
- encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, cellClass);
-
- if(component instanceof org.richfaces.component.UIColumn) {
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)component;
-
- int rowspan = column.getRowspan();
- if(rowspan != Integer.MIN_VALUE) {
- writer.writeAttribute("rowspan", Integer.valueOf(rowspan), null);
- }
-
- int colspan = column.getColspan();
- if(colspan != Integer.MIN_VALUE) {
- writer.writeAttribute("colspan", Integer.valueOf(colspan), null);
- }
- }
- renderChildren(context, component);
- }
-
- public void encodeFirstRowEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- writer.endElement(HTML.TR_ELEMENT);
- }
-
- public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
- writer.startElement(HTML.TR_ELEMENT, component);
- String styleClass = holder.getFirstRowClass() + " " + holder.getRowClass();
- encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
- }
-
- public void encodeRowEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- writer.endElement(HTML.TR_ELEMENT);
- }
-
- public void encodeRowStart(ResponseWriter writer, FacesContext context, UIComponent component, RowHolder holder) throws IOException {
- writer.startElement(HTML.TR_ELEMENT, component);
- String styleClass = holder.getRowClass();
- encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
- }
-
- public void encodeTableBodyEnd(ResponseWriter writer, FacesContext context, UIDataTable component) throws IOException {
- writer.endElement(HTML.TABLE_ELEMENT);
- }
-
- public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTable component) throws IOException {
- writer.startElement(HTML.BODY_ELEMENT, component);
- }
-
- public void encodeTableEnd(ResponseWriter writer, FacesContext context, UIDataTable component) throws IOException {
- writer.endElement(HTML.BODY_ELEMENT);
- }
-
- public void encodeTableStart(ResponseWriter writer, FacesContext context, UIDataTable component) throws IOException {
- writer.startElement(HTML.TABLE_ELEMENT, component);
- String styleClass = getTableSkinClass();
- encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
- }
-
- public void encodeCaption(ResponseWriter writer, FacesContext context, UIDataTable dataTable) throws IOException {
-
- UIComponent caption = dataTable.getCaption();
-
- if (caption == null) {
- return;
- }
-
- if(!caption.isRendered()) {
- return;
- }
-
- writer.startElement(HTML.CAPTION_ELEMENT, dataTable);
-
- String captionClass = (String) dataTable.getAttributes().get("captionClass");
- String captionSkinClass = getCaptionSkinClass();
- captionClass = captionClass != null ? captionClass + " " + captionClass : captionSkinClass;
-
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, captionClass, "captionClass");
-
- String captionStyle = (String) dataTable.getAttributes().get("captionStyle");
-
- if (captionStyle != null && captionStyle.trim().length()!=0) {
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, captionStyle, "captionStyle");
- }
-
- renderChild(context, caption);
-
- writer.endElement(HTML.CAPTION_ELEMENT);
- }
-
- public void encodeFooter(ResponseWriter writer, FacesContext context, UIDataTable dataTable, int columns) throws IOException {
-
- Iterator<UIComponent> tableColumns = dataTable.columns();
-
- UIComponent footer = dataTable.getFooter();
-
- boolean columnFacetPresent = isColumnFacetPresent(dataTable, "footer");
-
- if ((footer != null && footer.isRendered()) || columnFacetPresent) {
-
- writer.startElement(HTML.TFOOT_ELEMENT, dataTable);
- String footerClass = (String) dataTable.getAttributes().get("footerClass");
-
- if (columnFacetPresent) {
- writer.startElement(HTML.TR_ELEMENT, dataTable);
-
- encodeStyleClass(writer, context, dataTable, "footerClass", "rich-table-subfooter");
- //TODO nick - use "th" instead of "td"?
- //TODO nick - rename method "encodeHeaderFacets"
- encodeHeaderFacets(context, writer, tableColumns, "rich-table-subfootercell",
- footerClass, "footer", HTML.TD_ELEM, columns);
- writer.endElement(HTML.TR_ELEMENT);
- }
-
-
- if (footer != null && footer.isRendered()) {
- //TODO nick - use "th" instead of "td"?
- //TODO nick - rename method "encodeTableHeaderFacet"
- encodeTableHeaderFacet(context, columns, writer, footer,
- "rich-table-footer",
- "rich-table-footer-continue",
- "rich-table-footercell",
- footerClass, HTML.TH_ELEM);
- }
-
- writer.endElement(HTML.TFOOT_ELEMENT);
- }
- }
-
- public void encodeHeader(ResponseWriter writer, FacesContext context, UIDataTable dataTable, int columns) throws IOException {
-
- UIComponent header = dataTable.getHeader();
- boolean isEncodeHeaders = isEncodeHeaders(dataTable);
-
- if ((header != null && header.isRendered()) || isEncodeHeaders) {
-
- writer.startElement(HTML.THEAD_ELEMENT, dataTable);
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-table-thead", null);
-
- String headerClass = (String) dataTable.getAttributes().get("headerClass");
-
- if (header != null && header.isRendered()) {
- encodeTableHeaderFacet(context, columns, writer, header,
- "rich-table-header",
- //TODO nick - rename classes!!!
- "rich-table-header-continue",
- "rich-table-headercell",
- headerClass, HTML.TH_ELEM);
- }
-
- if (isEncodeHeaders) {
- writer.startElement(HTML.TR_ELEMENT, dataTable);
- encodeStyleClass(writer, context, dataTable, "headerClass", "rich-table-subheader");
- encodeHeaderFacets(context, writer, dataTable.columns(), "rich-table-subheadercell", headerClass, "header", HTML.TH_ELEM, columns);
- writer.endElement(HTML.TR_ELEMENT);
- }
-
- writer.endElement(HTML.THEAD_ELEMENT);
- }
- }
-
- protected void encodeTableHeaderFacet(FacesContext context, int columns, ResponseWriter writer, UIComponent footer,
- String skinFirstRowClass, String skinRowClass, String skinCellClass, String footerClass, String element)
- throws IOException {
-
- if(footer instanceof Row) {
- Row row = (Row)footer;
-
- RowHolder holder = new RowHolder(row);
- holder.setCellElement(element);
- holder.setFirstRowClass(skinFirstRowClass);
- holder.setRowClass(skinRowClass);
- holder.setCellClass(skinCellClass);
- holder.resetCurrentRow();
- holder.setHeaderRow(true);
-
- encodeRows(context, row, holder);
- } else {
- writer.startElement(HTML.TR_ELEMENT, footer);
-
- String rowClass = skinFirstRowClass;
- String cellClass = skinCellClass;
- if(footerClass != null && footerClass.trim().length()!=0) {
- rowClass = rowClass + " " + footerClass;
- cellClass = cellClass + " " + footerClass;
- }
-
- encodeStyleClass(writer, context, footer, null, rowClass);
-
- writer.startElement(element, footer);
-
- encodeStyleClass(writer, context, footer, null, cellClass);
-
- if(columns > 0) {
- writer.writeAttribute("colspan", String.valueOf(columns), null);
- }
- writer.writeAttribute("scope", "colgroup", null);
-
- renderChild(context, footer);
-
- writer.endElement(element);
- writer.endElement(HTML.TR_ELEMENT);
- }
- }
-
- protected void encodeHeaderFacets(FacesContext context, ResponseWriter writer, Iterator<UIComponent> headers,
- String skinCellClass, String headerClass, String facetName, String element, int colCount) throws IOException {
-
- int tColCount = 0;
-
- while (headers.hasNext()) {
- UIComponent column = headers.next();
- if (!column.isRendered()) {
- continue;
- }
-
- Integer colspan = (Integer) column.getAttributes().get("colspan");
- if (colspan != null && colspan.intValue() > 0) {
- tColCount += colspan.intValue();
- } else {
- tColCount++;
- }
-
- if (tColCount > colCount) {
- break;
- }
-
- String classAttribute = facetName + "Class";
- String columnHeaderClass = (String) column.getAttributes().get(classAttribute);
-
- String styleClass = skinCellClass;
- if(headerClass != null && headerClass.trim().length() != 0) {
- styleClass = styleClass + " " + headerClass;
- }
-
- if(columnHeaderClass != null && columnHeaderClass.trim().length() != 0) {
- styleClass = styleClass + " " + columnHeaderClass;
- }
-
-
- writer.startElement(element, column);
-
- encodeStyleClass(writer, context, column, null, styleClass);
-
- writer.writeAttribute("scope", "col", null);
- getUtils().encodeAttribute(context, column, "colspan");
-
- UIComponent facet = column.getFacet(facetName);
- if (facet != null && facet.isRendered()) {
- renderChild(context, facet);
- }
-
- writer.endElement(element);
- }
- }
-
-
- protected void encodeStyleClass(ResponseWriter writer, FacesContext context, UIComponent component , String styleClassAttribute, String styleClass) throws IOException {
- boolean isEmpty = isEmpty(component, styleClassAttribute);
- if( isEmpty && !(styleClass != null && styleClass.trim().length() != 0)) {
- return;
- }
-
- String componentStyleClass = isEmpty ? styleClass : styleClass + " " + component.getAttributes().get(styleClassAttribute);
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, componentStyleClass, null);
- }
-
- protected boolean isEmpty(UIComponent component, String attribute) {
- if(attribute == null) {
- return true;
- }
- String value = (String) component.getAttributes().get(attribute);
- return !(value != null && value.trim().length()!=0);
- }
-
- protected void encodeStyle(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- String style = (String)component.getAttributes().get(HTML.STYLE_ATTRIBUTE);
- if(!isEmptyStyle(style)) {
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
- }
- }
-
- protected boolean isEmptyStyle(String style) {
- return !((style != null) && (style.trim().length()!=0));
- }
-
- protected String getTableSkinClass() {
- return "rich-table";
- }
-
- protected String getTableHeadSkinClass() {
- return "rich-table-head";
- }
-
- protected String getCaptionSkinClass() {
- return "rich-table-caption";
- }
-
-}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml 2009-11-05 17:00:48 UTC (rev 15842)
@@ -4,8 +4,8 @@
version="2.0">
<component>
- <component-type>org.richfaces.SimpleDataTable</component-type>
- <component-class>org.richfaces.component.html.HtmlSimpleDataTable</component-class>
+ <component-type>org.richfaces.DataTable</component-type>
+ <component-class>org.richfaces.component.html.HtmlDataTable</component-class>
</component>
<component>
@@ -28,9 +28,9 @@
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
<renderer>
- <component-family>org.richfaces.SimpleDataTable</component-family>
- <renderer-type>org.richfaces.SimpleDataTableRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.SimpleDataTableRenderer</renderer-class>
+ <component-family>org.richfaces.DataTable</component-family>
+ <renderer-type>org.richfaces.DataTableRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.DataTableRenderer</renderer-class>
</renderer>
<renderer>
<component-family>org.richfaces.ExtendedDataTable</component-family>
Added: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/datatable.js
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/datatable.js (rev 0)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/datatable.js 2009-11-05 17:00:48 UTC (rev 15842)
@@ -0,0 +1 @@
+var i = 1;
\ No newline at end of file
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/simple-datatable.js
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/simple-datatable.js 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/simple-datatable.js 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1 +0,0 @@
-var i = 1;
\ No newline at end of file
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/table.css
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/table.css 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/table.css 2009-11-05 17:00:48 UTC (rev 15842)
@@ -1,3 +1,110 @@
+.rich-table{
+ background-color:#FFFFFF;
+ border-collapse:collapse;
+ border-left:1px solid #C0C0C0;
+ border-top:1px solid #C0C0C0;
+ empty-cells:show;
+}
+
+.rich-table-row{
+}
+
+.rich-table-firstrow{
+}
+
+.rich-table-cell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ padding:4px;
+}
+
+
+.rich-subtable-row{
+}
+
+.rich-subtable-firstrow{
+}
+
+.rich-subtable-cell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#000000;
+ background-color: #F0F0F0;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ padding:4px;
+}
+
+.rich-table-header{
+}
+
+.rich-table-header-continue{
+}
+
+.rich-table-headercell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ font-weight:bold;
+ padding:4px;
+ text-align:center;
+}
+
+.rich-table-subheader{
+}
+
+.rich-table-subheadercell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#00000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ padding:4px;
+}
+
+.rich-table-subfootercell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#00000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ padding:4px;
+}
+
+.rich-table-thead{
+ border-bottom:1px solid #C0C0C0;
+}
+
+.rich-table-footer{
+}
+
+.rich-table-footer-continue{
+}
+
+.rich-table-footercell{
+ border-bottom:1px solid #C0C0C0;
+ border-right:1px solid #C0C0C0;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ font-weight:bold;
+ padding:4px;
+ text-align:left;
+}
+
+.rich-subtable-footer{
+}
+
+.rich-subtable-footercell{
+
+}
+
+
<?xml version="1.0" encoding="UTF-8"?>
<f:template xmlns:f='http:/jsf.exadel.com/template'
xmlns:u='http:/jsf.exadel.com/template/util'
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2009-11-05 14:27:15 UTC (rev 15841)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2009-11-05 17:00:48 UTC (rev 15842)
@@ -4,10 +4,10 @@
<namespace>http://richfaces.org/rich</namespace>
<tag>
- <tag-name>simpleDataTable</tag-name>
+ <tag-name>dataTable</tag-name>
<component>
- <component-type>org.richfaces.SimpleDataTable</component-type>
- <renderer-type>org.richfaces.SimpleDataTableRenderer</renderer-type>
+ <component-type>org.richfaces.DataTable</component-type>
+ <renderer-type>org.richfaces.DataTableRenderer</renderer-type>
</component>
</tag>
<tag>
15 years, 1 month
JBoss Rich Faces SVN: r15841 - root/examples-sandbox/trunk/components/tables/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 09:27:15 -0500 (Thu, 05 Nov 2009)
New Revision: 15841
Modified:
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Log:
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 14:26:30 UTC (rev 15840)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 14:27:15 UTC (rev 15841)
@@ -18,9 +18,9 @@
</f:facet>
<f:facet name="header">
<rich:colGroup id="headerFacet1" >
- <rich:column><h:outputText id="headerFacet12" value="header column 1"> </h:outputText></rich:column>
- <rich:column><h:outputText id="headerFacet13" value="header column 2"></h:outputText></rich:column>
- <rich:column><h:outputText id="headerFacet14" value="header column 3"></h:outputText></rich:column>
+ <rich:column colspan="3"><h:outputText id="headerFacet12" value="header column 1"> </h:outputText></rich:column>
+ <rich:column breakBefore="true"><h:outputText id="headerFacet13" value="header column 2"></h:outputText></rich:column>
+ <rich:column colspan="2"><h:outputText id="headerFacet14" value="header column 3"></h:outputText></rich:column>
</rich:colGroup>
</f:facet>
<rich:column id="column_name">
15 years, 1 month
JBoss Rich Faces SVN: r15840 - root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 09:26:30 -0500 (Thu, 05 Nov 2009)
New Revision: 15840
Modified:
root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Column.java
Log:
Modified: root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Column.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Column.java 2009-11-05 14:25:51 UTC (rev 15839)
+++ root/ui-sandbox/trunk/components/tables/api/src/main/java/org/richfaces/component/Column.java 2009-11-05 14:26:30 UTC (rev 15840)
@@ -34,19 +34,6 @@
/**
- * Out this column on new row
- * @parameter
- * @return the acceptClass
- */
- public abstract boolean isBreakBefore();
-
- /**
- * @param newBreakBefore the value to set
- */
- public abstract void setBreakBefore(boolean newBreakBefore);
-
-
- /**
* The column allows data sorting
* @return
*/
@@ -79,4 +66,18 @@
public abstract boolean isSelfSorted();
public abstract void setSelfSorted(boolean selfSorted);
+
+
+ /**
+ * Out this column on new row
+ * @parameter
+ * @return the acceptClass
+ */
+ public abstract boolean isBreakBefore();
+
+ /**
+ * @param newBreakBefore the value to set
+ */
+ public abstract void setBreakBefore(boolean breakBefore);
+
}
15 years, 1 month
JBoss Rich Faces SVN: r15839 - in root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces: component/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 09:25:51 -0500 (Thu, 05 Nov 2009)
New Revision: 15839
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIColumn.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumn.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java
Log:
add breakBefore, rospan, colspan
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIColumn.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIColumn.java 2009-11-05 13:45:22 UTC (rev 15838)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIColumn.java 2009-11-05 14:25:51 UTC (rev 15839)
@@ -2,5 +2,13 @@
public abstract class UIColumn extends javax.faces.component.UIColumn implements Column {
+
+ public abstract int getRowspan();
+ public abstract void setRowspan(int rowspan);
+
+ public abstract int getColspan();
+ public abstract void setColspan(int colspan);
+
+
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumn.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumn.java 2009-11-05 13:45:22 UTC (rev 15838)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/html/HtmlColumn.java 2009-11-05 14:25:51 UTC (rev 15839)
@@ -6,9 +6,44 @@
import org.richfaces.model.Ordering;
public class HtmlColumn extends UIColumn {
+
+ enum PropertyKeys {
+ breakBefore, rowspan, colspan
+ }
+
public static final String COMPONENT_TYPE = "org.richfaces.Column";
public static final String COMPONENT_FAMILY = "org.richfaces.Column";
+
+ public void setBreakBefore(boolean breakBefore) {
+ getStateHelper().put(PropertyKeys.breakBefore, Boolean.valueOf(breakBefore));
+ }
+
+ public boolean isBreakBefore() {
+ Boolean breakBefore = ((Boolean)getStateHelper().eval(PropertyKeys.breakBefore, Boolean.FALSE));
+ return breakBefore.booleanValue();
+ }
+
+ public int getColspan(){
+ Integer colspan = (Integer)getStateHelper().eval(PropertyKeys.colspan, Integer.MIN_VALUE);
+ return colspan.intValue();
+ }
+
+ public void setColspan(int colspan) {
+ getStateHelper().put(PropertyKeys.colspan, Integer.valueOf(colspan));
+ }
+
+ public int getRowspan(){
+ Integer rowspan = (Integer)getStateHelper().eval(PropertyKeys.rowspan, Integer.MIN_VALUE);
+ return rowspan.intValue();
+ }
+
+ public void setRowspan(int rowspan) {
+ getStateHelper().put(PropertyKeys.rowspan, Integer.valueOf(rowspan));
+ }
+
+
+
public MethodExpression getFilterMethod() {
// TODO Auto-generated method stub
return null;
@@ -24,10 +59,7 @@
// TODO Auto-generated method stub
return null;
}
- public boolean isBreakBefore() {
- // TODO Auto-generated method stub
- return false;
- }
+
public boolean isSelfSorted() {
// TODO Auto-generated method stub
return false;
@@ -36,10 +68,6 @@
// TODO Auto-generated method stub
return false;
}
- public void setBreakBefore(boolean newBreakBefore) {
- // TODO Auto-generated method stub
-
- }
public void setFilterMethod(MethodExpression methodExpression) {
// TODO Auto-generated method stub
@@ -63,5 +91,5 @@
public void setSortable(boolean sortable) {
// TODO Auto-generated method stub
}
-
+
}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java 2009-11-05 13:45:22 UTC (rev 15838)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/SimpleDataTableRenderer.java 2009-11-05 14:25:51 UTC (rev 15839)
@@ -102,6 +102,15 @@
} else if(child instanceof UIColumn) {
+ if(child instanceof org.richfaces.component.UIColumn) {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)child;
+ if(column.isBreakBefore() && processCell !=0) {
+ encodeRowEnd(writer, context, column);
+ rowHolder.nextRow();
+ rowStart = true;
+ }
+ }
+
if(rowStart) {
if(processRow == 0) {
@@ -125,6 +134,7 @@
}
processCell++;
}
+
}
}
@@ -180,6 +190,20 @@
writer.startElement(HTML.TD_ELEM, component);
String cellClass = holder.getCellClass();
encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, cellClass);
+
+ if(component instanceof org.richfaces.component.UIColumn) {
+ org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn)component;
+
+ int rowspan = column.getRowspan();
+ if(rowspan != Integer.MIN_VALUE) {
+ writer.writeAttribute("rowspan", Integer.valueOf(rowspan), null);
+ }
+
+ int colspan = column.getColspan();
+ if(colspan != Integer.MIN_VALUE) {
+ writer.writeAttribute("colspan", Integer.valueOf(colspan), null);
+ }
+ }
renderChildren(context, component);
}
@@ -273,7 +297,7 @@
//TODO nick - rename method "encodeHeaderFacets"
encodeHeaderFacets(context, writer, tableColumns, "rich-table-subfootercell",
footerClass, "footer", HTML.TD_ELEM, columns);
- writer.endElement("tr");
+ writer.endElement(HTML.TR_ELEMENT);
}
@@ -319,7 +343,7 @@
writer.endElement(HTML.TR_ELEMENT);
}
- writer.endElement("thead");
+ writer.endElement(HTML.THEAD_ELEMENT);
}
}
@@ -363,7 +387,7 @@
renderChild(context, footer);
writer.endElement(element);
- writer.endElement("tr");
+ writer.endElement(HTML.TR_ELEMENT);
}
}
15 years, 1 month
JBoss Rich Faces SVN: r15838 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: java/org/jboss/richfaces/integrationTest/contextMenu and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-11-05 08:45:22 -0500 (Thu, 05 Nov 2009)
New Revision: 15838
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/OrganizerTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeNodesAdaptorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/contextMenu/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/dropDownMenu/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/messages.properties
Log:
* XPath locators changed to jQuery locators.
* Method testInsertCustomCharacter in AdvancedEditorTestCase removed - problem in Windows.
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/OrganizerTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/OrganizerTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/OrganizerTestCase.java 2009-11-05 13:45:22 UTC (rev 15838)
@@ -57,86 +57,86 @@
private final String LOC_DIALOG_CANCEL_BUTTON = getLoc("DIALOG_CANCEL_BUTTON");
private final String LOC_DIALOG_CROSS_BUTTON = getLoc("DIALOG_CROSS_BUTTON");
- /**
- * Tests that today's cell is highlighted. It goes through the table until
- * it finds today's date.
- */
- @Test
- public void testTodayIsHighlighted() {
- String today = Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH));
- String text = null;
+// /**
+// * Tests that today's cell is highlighted. It goes through the table until
+// * it finds today's date.
+// */
+// @Test
+// public void testTodayIsHighlighted() {
+// String today = Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH));
+// String text = null;
+//
+// int fromLine = 1;
+// if (Integer.parseInt(today) > 15) {
+// fromLine = 3;
+// }
+//
+// for (int i = fromLine; i < 6; i++) {
+// for (int j = 0; j < 7; j++) {
+// text = selenium.getText(format(LOC_CELL_DATE_PREFORMATTED, i, j));
+// if (today.equals(text)) {
+// assertTrue(belongsClass("rich-calendar-today", format(LOC_CELL_PREFORMATTED, i, j)),
+// "Class attribute of the cell with today's date should contain \"rich-calendar-today\".");
+// return;
+// }
+// }
+// }
+// }
+//
+// /**
+// * Tests the last cell of the table. The last line is usually empty and the
+// * last cell of the last row has to be disabled.
+// */
+// @Test
+// public void testLastDayIsGrey() {
+// assertTrue(belongsClass("rich-calendar-boundary-dates", format(LOC_CELL_PREFORMATTED, 6, 6)),
+// "Class attribute of the last cell should contain \"rich-calendar-boundary-dates\".");
+// }
+//
+// /**
+// * Tests adding a new note to the organizer. First it checks the text of the
+// * selected cell (2nd week, 3rd day), checks that the dialog is hidden,
+// * clicks into the cell, and checks that the dialog is shown. Then it enters
+// * values into description and note fields and clicks the store button. In
+// * the end it checks that the organizer was changed.
+// */
+// @Test
+// public void testSaveNote() {
+// String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3));
+// assertEquals(text, "Nothing planned", "The description in the cell (week 2, day 3).");
+//
+// assertFalse(isDisplayed(LOC_DIALOG), "Dialog should not be visible.");
+//
+// selenium.click(format(LOC_CELL_PREFORMATTED, 4, 3));
+//
+// // wait for JavaScript to show the dialog
+// Wait.until(new Condition() {
+// public boolean isTrue() {
+// return isDisplayed(LOC_DIALOG);
+// }
+// });
+//
+// assertTrue(isDisplayed(LOC_DIALOG), "Dialog should be visible.");
+//
+// selenium.type(LOC_DIALOG_DESCRIPTION, "some description");
+// selenium.type(LOC_DIALOG_NOTE, "note note note note note");
+// selenium.click(LOC_DIALOG_STORE_BUTTON);
+//
+// // wait for JavaScript to change the organizer
+// Wait.until(new Condition() {
+// public boolean isTrue() {
+// return !"Nothing planned".equals(selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3)));
+// }
+// });
+//
+// text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3));
+// assertEquals(text, "some description", "The description in the cell (week 2, day 3).");
+//
+// text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 4, 3));
+// assertEquals(text, "note note note note note", "The note in the cell (week 2, day 3).");
+// }
- int fromLine = 1;
- if (Integer.parseInt(today) > 15) {
- fromLine = 3;
- }
-
- for (int i = fromLine; i < 6; i++) {
- for (int j = 0; j < 7; j++) {
- text = selenium.getText(format(LOC_CELL_DATE_PREFORMATTED, i, j));
- if (today.equals(text)) {
- assertTrue(belongsClass("rich-calendar-today", format(LOC_CELL_PREFORMATTED, i, j)),
- "Class attribute of the cell with today's date should contain \"rich-calendar-today\".");
- return;
- }
- }
- }
- }
-
/**
- * Tests the last cell of the table. The last line is usually empty and the
- * last cell of the last row has to be disabled.
- */
- @Test
- public void testLastDayIsGrey() {
- assertTrue(belongsClass("rich-calendar-boundary-dates", format(LOC_CELL_PREFORMATTED, 6, 6)),
- "Class attribute of the last cell should contain \"rich-calendar-boundary-dates\".");
- }
-
- /**
- * Tests adding a new note to the organizer. First it checks the text of the
- * selected cell (2nd week, 3rd day), checks that the dialog is hidden,
- * clicks into the cell, and checks that the dialog is shown. Then it enters
- * values into description and note fields and clicks the store button. In
- * the end it checks that the organizer was changed.
- */
- @Test
- public void testSaveNote() {
- String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3));
- assertEquals(text, "Nothing planned", "The description in the cell (week 2, day 3).");
-
- assertFalse(isDisplayed(LOC_DIALOG), "Dialog should not be visible.");
-
- selenium.click(format(LOC_CELL_PREFORMATTED, 4, 3));
-
- // wait for JavaScript to show the dialog
- Wait.until(new Condition() {
- public boolean isTrue() {
- return isDisplayed(LOC_DIALOG);
- }
- });
-
- assertTrue(isDisplayed(LOC_DIALOG), "Dialog should be visible.");
-
- selenium.type(LOC_DIALOG_DESCRIPTION, "some description");
- selenium.type(LOC_DIALOG_NOTE, "note note note note note");
- selenium.click(LOC_DIALOG_STORE_BUTTON);
-
- // wait for JavaScript to change the organizer
- Wait.until(new Condition() {
- public boolean isTrue() {
- return !"Nothing planned".equals(selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3)));
- }
- });
-
- text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 4, 3));
- assertEquals(text, "some description", "The description in the cell (week 2, day 3).");
-
- text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 4, 3));
- assertEquals(text, "note note note note note", "The note in the cell (week 2, day 3).");
- }
-
- /**
* Tests the cancel button. First it checks the content of the cell in the
* 3rd week, 3rd day. Then it clicks into the cell, enters the description
* and note, and clicks the cancel button. In the end it verifies that the
@@ -144,12 +144,12 @@
*/
@Test
public void testCancelNoteCancelButton() {
- String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 5, 3));
+ String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 3, 2));
assertEquals(text, "Nothing planned", "The description in the cell (week 3, day 3).");
assertFalse(isDisplayed(LOC_DIALOG), "Dialog should not be visible.");
- selenium.click(format(LOC_CELL_PREFORMATTED, 5, 3));
+ selenium.click(format(LOC_CELL_PREFORMATTED, 3, 2));
// wait for JavaScript to show the dialog
Wait.until(new Condition() {
@@ -167,10 +167,10 @@
// wait for JavaScript to finish - nothing should change
waitFor(3000);
- text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 5, 3));
+ text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 3, 2));
assertEquals(text, "Nothing planned", "The description in the cell (week 3, day 3).");
- text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 5, 3));
+ text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 3, 2));
assertEquals(text, "", "The note in the cell (week 3, day 3).");
}
@@ -182,12 +182,12 @@
*/
@Test
public void testCancelNoteCrossButton() {
- String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 5, 5));
+ String text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 3, 4));
assertEquals(text, "Nothing planned", "The description in the cell (week 3, day 5).");
assertFalse(isDisplayed(LOC_DIALOG), "Dialog should be visible.");
- selenium.click(format(LOC_CELL_PREFORMATTED, 5, 5));
+ selenium.click(format(LOC_CELL_PREFORMATTED, 3, 4));
// wait for JavaScript to show the dialog
Wait.until(new Condition() {
@@ -205,53 +205,53 @@
// wait for JavaScript to finish - nothing should change
waitFor(3000);
- text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 5, 5));
+ text = selenium.getText(format(LOC_CELL_DESC_PREFORMATTED, 3, 4));
assertEquals(text, "Nothing planned", "The description in the cell (week 3, day 5).");
- text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 5, 5));
+ text = selenium.getText(format(LOC_CELL_NOTE_PREFORMATTED, 3, 4));
assertEquals(text, "", "The note in the cell (week 3, day 5).");
}
- /**
- * Tests the "View Source". It checks that the source code is not visible,
- * clicks on the link, and checks 8 lines of source code.
- */
- @Test
- public void testPageSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<rich:messages/>",
- "<a4j:jsFunction name=\"ajaxSubmit\" oncomplete=\"#{rich:component('panel')}.show()\" reRender=\"editContent\" />",
- "<rich:calendar value=\"#{calendarBean.selectedDate}\"",
- "cellWidth=\"100px\" cellHeight=\"100px\"",
- "dataModel=\"#{calendarDataModel}\" onchanged=\"if (event.rich.date) {ajaxSubmit();}\" oncurrentdateselect=\"return false\"",
- "<a4j:outputPanel layout=\"block\" id=\"cell\" onclick=\"#{rich:component('organizer')}.resetSelectedDate()\" style=\"height: 100%;\">",
- "<rich:modalPanel id=\"panel\" resizeable=\"false\">", };
+// /**
+// * Tests the "View Source". It checks that the source code is not visible,
+// * clicks on the link, and checks 8 lines of source code.
+// */
+// @Test
+// public void testPageSource() {
+// String[] strings = new String[] {
+// "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+// "<rich:messages/>",
+// "<a4j:jsFunction name=\"ajaxSubmit\" oncomplete=\"#{rich:component('panel')}.show()\" reRender=\"editContent\" />",
+// "<rich:calendar value=\"#{calendarBean.selectedDate}\"",
+// "cellWidth=\"100px\" cellHeight=\"100px\"",
+// "dataModel=\"#{calendarDataModel}\" onchanged=\"if (event.rich.date) {ajaxSubmit();}\" oncurrentdateselect=\"return false\"",
+// "<a4j:outputPanel layout=\"block\" id=\"cell\" onclick=\"#{rich:component('organizer')}.resetSelectedDate()\" style=\"height: 100%;\">",
+// "<rich:modalPanel id=\"panel\" resizeable=\"false\">", };
+//
+// abstractTestSource(1, "View Source", strings);
+// }
+//
+// /**
+// * Tests the source of CalendarDataModelImpl.java. It checks that the source
+// * code is not visible, clicks on the link, and checks 8 lines of source
+// * code.
+// */
+// @Test
+// public void testDataModelSource() {
+// String[] strings = new String[] {
+// "package org.richfaces.demo.calendar.modelImpl;",
+// "import org.richfaces.model.CalendarDataModelItem;",
+// "private CalendarDataModelItem[] items;",
+// "public CalendarDataModelItem[] getData(Date[] dateArray) {",
+// "protected CalendarDataModelItem createDataModelItem(Date date) {",
+// "item.setDay(c.get(Calendar.DAY_OF_MONTH));",
+// "setCurrentDescription((String)((HashMap)items[calendar.get(Calendar.DAY_OF_MONTH)-1].getData()).get(\"description\"));",
+// "public String getCurrentShortDescription() {", };
+//
+// abstractTestSource(1, "CalendarDataModelImpl.java", strings);
+// }
- abstractTestSource(1, "View Source", strings);
- }
-
/**
- * Tests the source of CalendarDataModelImpl.java. It checks that the source
- * code is not visible, clicks on the link, and checks 8 lines of source
- * code.
- */
- @Test
- public void testDataModelSource() {
- String[] strings = new String[] {
- "package org.richfaces.demo.calendar.modelImpl;",
- "import org.richfaces.model.CalendarDataModelItem;",
- "private CalendarDataModelItem[] items;",
- "public CalendarDataModelItem[] getData(Date[] dateArray) {",
- "protected CalendarDataModelItem createDataModelItem(Date date) {",
- "item.setDay(c.get(Calendar.DAY_OF_MONTH));",
- "setCurrentDescription((String)((HashMap)items[calendar.get(Calendar.DAY_OF_MONTH)-1].getData()).get(\"description\"));",
- "public String getCurrentShortDescription() {", };
-
- abstractTestSource(1, "CalendarDataModelImpl.java", strings);
- }
-
- /**
* Tests the source of CalendarDataModelItemImpl.java. It checks that the
* source code is not visible, clicks on the link, and checks 8 lines of
* source code.
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java 2009-11-05 13:45:22 UTC (rev 15838)
@@ -75,19 +75,19 @@
// open context menu on third line, first column
selenium.click(LOC_SECOND_LINE_3_COLUMN_1);
- waitForElement(LOC_SECOND_CONTEXT_MENU);
+ waitForElement(LOC_SECOND_CONTEXT_MENU, 200);
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on first column.");
// open context menu on sixth line, second column
selenium.click(LOC_SECOND_LINE_6_COLUMN_2);
- waitForElement(LOC_SECOND_CONTEXT_MENU);
+ waitForElement(LOC_SECOND_CONTEXT_MENU, 200);
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on second column.");
// open context menu on first line, third column
selenium.click(LOC_SECOND_LINE_1_COLUMN_3);
- waitForElement(LOC_SECOND_CONTEXT_MENU);
+ waitForElement(LOC_SECOND_CONTEXT_MENU, 200);
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on third column.");
}
@@ -102,7 +102,7 @@
// open context menu on third line, first column
selenium.click(LOC_SECOND_LINE_3_COLUMN_1);
- waitForElement(LOC_SECOND_CONTEXT_MENU);
+ waitForElement(LOC_SECOND_CONTEXT_MENU, 200);
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on first column.");
@@ -118,7 +118,7 @@
*/
@Test
public void testClickOnPutCarToBasket() {
- clickAction(1);
+ clickAction(0);
}
/**
@@ -126,7 +126,7 @@
*/
@Test
public void testClickOnReadComments() {
- clickAction(2);
+ clickAction(1);
}
/**
@@ -134,7 +134,7 @@
*/
@Test
public void testClickOnGoToProducerSite() {
- clickAction(3);
+ clickAction(2);
}
/**
@@ -170,7 +170,7 @@
// open context menu on third line, first column
selenium.click(LOC_SECOND_LINE_3_COLUMN_1);
- waitForElement(LOC_SECOND_CONTEXT_MENU);
+ waitForElement(LOC_SECOND_CONTEXT_MENU, 200);
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on first column.");
@@ -187,14 +187,14 @@
String text = selenium.getText(LOC_SECOND_LAST_MENU_ACTION);
switch (index) {
- case 1:
+ case 0:
assertEquals(text, format(MSG_SECOND_PUT_PRODUCER_MODEL_TO_BASKET_PREFORMATTED, producer, model),
"Action put to basket:");
break;
- case 2:
+ case 1:
assertEquals(text, MSG_SECOND_READ_COMMENTS_PREFORMATTED, "Action read comments:");
break;
- case 3:
+ case 2:
assertEquals(text, format(MSG_SECOND_GO_TO_PRODUCER_SITE_PREFORMATTED, producer), "Action go to site:");
break;
default:
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java 2009-11-05 13:45:22 UTC (rev 15838)
@@ -806,37 +806,37 @@
selenium.selectFrame("relative=top");
}
- /**
- * Tests inserting custom character. It tries to insert euro sign, upper
- * case omega, and a symbol for heart suite.
- */
- @Test
- public void testInsertCustomCharacter() {
- selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
- waitForElement(LOC_ADV_DIALOG_IFRAME);
- selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
- // euro sign
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
+// /**
+// * Tests inserting custom character. It tries to insert euro sign, upper
+// * case omega, and a symbol for heart suite.
+// */
+// @Test
+// public void testInsertCustomCharacter() {
+// selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
+// waitForElement(LOC_ADV_DIALOG_IFRAME);
+// selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
+// waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
+// // euro sign
+// selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
+//
+// selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
+// waitForElement(LOC_ADV_DIALOG_IFRAME);
+// selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
+// waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
+// // Omega
+// selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
+//
+// selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
+// waitForElement(LOC_ADV_DIALOG_IFRAME);
+// selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
+// waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
+// // heart suite
+// selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
+//
+// String text = selenium.getText(LOC_TEXT_AREA_P);
+// assertEquals(text, "€Ω♥", MSG_CONTENT_OF_THE_EDITOR);
+// }
- selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
- waitForElement(LOC_ADV_DIALOG_IFRAME);
- selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
- // Omega
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
-
- selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
- waitForElement(LOC_ADV_DIALOG_IFRAME);
- selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
- // heart suite
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
-
- String text = selenium.getText(LOC_TEXT_AREA_P);
- assertEquals(text, "€Ω♥", MSG_CONTENT_OF_THE_EDITOR);
- }
-
/**
* Loads the page containing the calendar component.
*/
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeNodesAdaptorTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeNodesAdaptorTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeNodesAdaptorTestCase.java 2009-11-05 13:45:22 UTC (rev 15838)
@@ -42,6 +42,7 @@
private final String LOC_EXAMPLE_HEADER = getLoc("EXAMPLE_HEADER");
private final String LOC_TABLE_SUBNODES = getLoc("TABLE_SUBNODES");
private final String LOC_DEMO_NODE = getLoc("DEMO_NODE");
+ private final String LOC_DIV_SUBNODES = getLoc("DIV_SUBNODES");
private final String LOC_DIV_SUBNODES_PREFORMATTED = getLoc("DIV_SUBNODES_PREFORMATTED");
private final int MSG_CHILDREN_COUNT = Integer.parseInt(getMsg("CHILDREN_COUNT"));
@@ -55,8 +56,8 @@
@Test
public void testTreeNodesAdaptor() {
scrollIntoView(LOC_EXAMPLE_HEADER, true);
-
- int count = selenium.getXpathCount(LOC_TABLE_SUBNODES).intValue();
+
+ int count = getJQueryCount(LOC_TABLE_SUBNODES);
assertEquals(count, MSG_CHILDREN_COUNT, "Nodes in org/richfaces.");
// click "demo"
@@ -65,114 +66,116 @@
// wait until the node is expanded
Wait.failWith("The node org/richfaces/demo should be expanded.").until(new Condition() {
public boolean isTrue() {
- return isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, 1));
+ return isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, 0));
}
});
// check that all siblings of node "demo" are collapsed
- for (int i = 2; i < 5; i++) {
- assertFalse(isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, i)), format("Node nr. {0} in /org/richfaces should be collapsed.", i));
+ for (int i = 1; i < 4; i++) {
+ assertFalse(isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, i)), format("Node nr. {0} in /org/richfaces should be collapsed.", i+1));
}
+ waitFor(6000);
// click "demo" (to collapse node)
selenium.click(LOC_DEMO_NODE);
-
+ waitFor(6000);
+
// wait until the node is collapsed
Wait.failWith("The node org/richfaces/demo should be collapsed.").until(new Condition() {
public boolean isTrue() {
- return !isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, 1));
+ return !isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, 0));
}
});
// check that all siblings of node "demo" are collapsed
- for (int i = 2; i < 5; i++) {
+ for (int i = 1; i < 4; i++) {
assertFalse(isDisplayed(format(LOC_DIV_SUBNODES_PREFORMATTED, i)), format(
- "Node nr. {0} in /org/richfaces should be collapsed.", i));
+ "Node nr. {0} in /org/richfaces should be collapsed.", i+1));
}
}
- /**
- * Tests the "View Source". It checks that the source code is not visible,
- * clicks on the link, and checks 7 lines of source code.
- */
- @Test
- public void testPageSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<h:form> ",
- "<rich:tree style=\"width:300px\" switchType=\"ajax\" stateAdvisor=\"#{treeDemoStateAdvisor}\">",
- "<rich:recursiveTreeNodesAdaptor roots=\"#{fileSystemBean.sourceRoots}\" var=\"item\" nodes=\"#{item.nodes}\" />",
- "</rich:tree>", "</h:form>", "</ui:composition>", };
+// /**
+// * Tests the "View Source". It checks that the source code is not visible,
+// * clicks on the link, and checks 7 lines of source code.
+// */
+// @Test
+// public void testPageSource() {
+// String[] strings = new String[] {
+// "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+// "<h:form> ",
+// "<rich:tree style=\"width:300px\" switchType=\"ajax\" stateAdvisor=\"#{treeDemoStateAdvisor}\">",
+// "<rich:recursiveTreeNodesAdaptor roots=\"#{fileSystemBean.sourceRoots}\" var=\"item\" nodes=\"#{item.nodes}\" />",
+// "</rich:tree>", "</h:form>", "</ui:composition>", };
+//
+// abstractTestSource(1, "View Source", strings);
+// }
+//
+// /**
+// * Tests the "View FileSystemBean.java Source". It checks that the source
+// * code is not visible, clicks on the link, and checks 8 lines of source
+// * code.
+// */
+// @Test
+// public void testFileSystemBeanSource() {
+// String[] strings = new String[] { "package org.richfaces.treemodeladaptor;", "public class FileSystemBean {",
+// "private static String SRC_PATH = \"/WEB-INF/src\";", "private FileSystemNode[] srcRoots;",
+// "public synchronized FileSystemNode[] getSourceRoots() {", "if (srcRoots == null) {",
+// "srcRoots = new FileSystemNode(SRC_PATH).getNodes();", "return srcRoots;", };
+//
+// abstractTestSource(1, "View FileSystemBean.java Source", strings);
+// }
+//
+// /**
+// * Tests the "View FileSystemNode.java Source". It checks that the source
+// * code is not visible, clicks on the link, and checks 8 lines of source
+// * code.
+// */
+// @Test
+// public void testFileSystemNodeSource() {
+// String[] strings = new String[] { "package org.richfaces.treemodeladaptor;", "public class FileSystemNode {",
+// "public FileSystemNode(String path) {", "public synchronized FileSystemNode[] getNodes() {",
+// "FacesContext facesContext = FacesContext.getCurrentInstance();",
+// "ExternalContext externalContext = facesContext.getExternalContext();",
+// "Set resourcePaths = externalContext.getResourcePaths(this.path);",
+// "Object[] nodes = (Object[]) resourcePaths.toArray();", };
+//
+// abstractTestSource(1, "View FileSystemNode.java Source", strings);
+// }
+//
+// /**
+// * Tests the "View PostbackPhaseListener.java Source". It checks that the
+// * source code is not visible, clicks on the link, and checks 8 lines of
+// * source code.
+// */
+// @Test
+// public void testPostbackPhaseListenerSource() {
+// String[] strings = new String[] { "package org.richfaces.treemodeladaptor;",
+// "public class PostbackPhaseListener implements PhaseListener {",
+// "public static final String POSTBACK_ATTRIBUTE_NAME = PostbackPhaseListener.class.getName();",
+// "public void afterPhase(PhaseEvent event) {", "public void beforePhase(PhaseEvent event) {",
+// "FacesContext facesContext = event.getFacesContext();", "public PhaseId getPhaseId() {",
+// "public static boolean isPostback() {", };
+//
+// abstractTestSource(1, "View PostbackPhaseListener.java Source", strings);
+// }
+//
+// /**
+// * Tests the "View TreeDemoStateAdvisor.java Source". It checks that the
+// * source code is not visible, clicks on the link, and checks 8 lines of
+// * source code.
+// */
+// @Test
+// public void testTreeDemoStateAdvisorSource() {
+// String[] strings = new String[] { "package org.richfaces.treemodeladaptor;",
+// "public class TreeDemoStateAdvisor implements TreeStateAdvisor {",
+// "public Boolean adviseNodeOpened(UITree tree) {", "if (!PostbackPhaseListener.isPostback()) {",
+// "Object key = tree.getRowKey();", "TreeRowKey treeRowKey = (TreeRowKey) key;",
+// "if (treeRowKey == null || treeRowKey.depth() <= 2) {", "return Boolean.TRUE;", };
+//
+// abstractTestSource(1, "View TreeDemoStateAdvisor.java Source", strings);
+// }
- abstractTestSource(1, "View Source", strings);
- }
-
/**
- * Tests the "View FileSystemBean.java Source". It checks that the source
- * code is not visible, clicks on the link, and checks 8 lines of source
- * code.
- */
- @Test
- public void testFileSystemBeanSource() {
- String[] strings = new String[] { "package org.richfaces.treemodeladaptor;", "public class FileSystemBean {",
- "private static String SRC_PATH = \"/WEB-INF/src\";", "private FileSystemNode[] srcRoots;",
- "public synchronized FileSystemNode[] getSourceRoots() {", "if (srcRoots == null) {",
- "srcRoots = new FileSystemNode(SRC_PATH).getNodes();", "return srcRoots;", };
-
- abstractTestSource(1, "View FileSystemBean.java Source", strings);
- }
-
- /**
- * Tests the "View FileSystemNode.java Source". It checks that the source
- * code is not visible, clicks on the link, and checks 8 lines of source
- * code.
- */
- @Test
- public void testFileSystemNodeSource() {
- String[] strings = new String[] { "package org.richfaces.treemodeladaptor;", "public class FileSystemNode {",
- "public FileSystemNode(String path) {", "public synchronized FileSystemNode[] getNodes() {",
- "FacesContext facesContext = FacesContext.getCurrentInstance();",
- "ExternalContext externalContext = facesContext.getExternalContext();",
- "Set resourcePaths = externalContext.getResourcePaths(this.path);",
- "Object[] nodes = (Object[]) resourcePaths.toArray();", };
-
- abstractTestSource(1, "View FileSystemNode.java Source", strings);
- }
-
- /**
- * Tests the "View PostbackPhaseListener.java Source". It checks that the
- * source code is not visible, clicks on the link, and checks 8 lines of
- * source code.
- */
- @Test
- public void testPostbackPhaseListenerSource() {
- String[] strings = new String[] { "package org.richfaces.treemodeladaptor;",
- "public class PostbackPhaseListener implements PhaseListener {",
- "public static final String POSTBACK_ATTRIBUTE_NAME = PostbackPhaseListener.class.getName();",
- "public void afterPhase(PhaseEvent event) {", "public void beforePhase(PhaseEvent event) {",
- "FacesContext facesContext = event.getFacesContext();", "public PhaseId getPhaseId() {",
- "public static boolean isPostback() {", };
-
- abstractTestSource(1, "View PostbackPhaseListener.java Source", strings);
- }
-
- /**
- * Tests the "View TreeDemoStateAdvisor.java Source". It checks that the
- * source code is not visible, clicks on the link, and checks 8 lines of
- * source code.
- */
- @Test
- public void testTreeDemoStateAdvisorSource() {
- String[] strings = new String[] { "package org.richfaces.treemodeladaptor;",
- "public class TreeDemoStateAdvisor implements TreeStateAdvisor {",
- "public Boolean adviseNodeOpened(UITree tree) {", "if (!PostbackPhaseListener.isPostback()) {",
- "Object key = tree.getRowKey();", "TreeRowKey treeRowKey = (TreeRowKey) key;",
- "if (treeRowKey == null || treeRowKey.depth() <= 2) {", "return Boolean.TRUE;", };
-
- abstractTestSource(1, "View TreeDemoStateAdvisor.java Source", strings);
- }
-
- /**
* Loads the needed page.
*/
@SuppressWarnings("unused")
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/tree/TreeTestCase.java 2009-11-05 13:45:22 UTC (rev 15838)
@@ -67,7 +67,7 @@
*/
@Test
public void testTreeAjax() {
- abstractTestTree(1);
+ abstractTestTree(0);
}
/**
@@ -78,7 +78,7 @@
*/
@Test
public void testTreeClient() {
- abstractTestTree(2);
+ abstractTestTree(1);
}
/**
@@ -89,67 +89,67 @@
*/
@Test
public void testTreeServer() {
- abstractTestTree(3);
+ abstractTestTree(2);
}
- /**
- * Tests the "View Source" in the first example -- Ajax switch type. It
- * checks that the source code is not visible, clicks on the link, and
- * checks 8 lines of source code.
- */
- @Test
- public void testAjaxExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<h:form>",
- "<rich:tree style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
- "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
- "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
- "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
- "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
+// /**
+// * Tests the "View Source" in the first example -- Ajax switch type. It
+// * checks that the source code is not visible, clicks on the link, and
+// * checks 8 lines of source code.
+// */
+// @Test
+// public void testAjaxExampleSource() {
+// String[] strings = new String[] {
+// "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+// "<h:form>",
+// "<rich:tree style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
+// "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
+// "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
+// "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
+// "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
+//
+// abstractTestSource(1, "View Source", strings);
+// }
+//
+// /**
+// * Tests the "View Source" in the second example -- client switch type. It
+// * checks that the source code is not visible, clicks on the link, and
+// * checks 8 lines of source code.
+// */
+// @Test
+// public void testClientExampleSource() {
+// String[] strings = new String[] {
+// "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+// "<h:form>",
+// "<rich:tree switchType=\"client\" style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
+// "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
+// "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
+// "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
+// "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
+//
+// abstractTestSource(2, "View Source", strings);
+// }
+//
+// /**
+// * Tests the "View Source" in the third example -- server switch type. It
+// * checks that the source code is not visible, clicks on the link, and
+// * checks 8 lines of source code.
+// */
+// @Test
+// public void testServerExampleSource() {
+// String[] strings = new String[] {
+// "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
+// "<h:form>",
+// "<rich:tree switchType=\"server\" style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
+// "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
+// "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
+// "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
+// "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
+//
+// abstractTestSource(3, "View Source", strings);
+// }
- abstractTestSource(1, "View Source", strings);
- }
-
/**
- * Tests the "View Source" in the second example -- client switch type. It
- * checks that the source code is not visible, clicks on the link, and
- * checks 8 lines of source code.
- */
- @Test
- public void testClientExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<h:form>",
- "<rich:tree switchType=\"client\" style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
- "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
- "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
- "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
- "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
-
- abstractTestSource(2, "View Source", strings);
- }
-
- /**
- * Tests the "View Source" in the third example -- server switch type. It
- * checks that the source code is not visible, clicks on the link, and
- * checks 8 lines of source code.
- */
- @Test
- public void testServerExampleSource() {
- String[] strings = new String[] {
- "<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"",
- "<h:form>",
- "<rich:tree switchType=\"server\" style=\"width:300px\" value=\"#{library.data}\" var=\"item\" nodeFace=\"#{item.type}\">",
- "<rich:treeNode type=\"artist\" iconLeaf=\"/images/tree/singer.gif\" icon=\"/images/tree/singer.gif\">",
- "<h:outputText value=\"#{item.name}\" />", "</rich:treeNode>",
- "<rich:treeNode type=\"album\" iconLeaf=\"/images/tree/disc.gif\" icon=\"/images/tree/disc.gif\">",
- "<rich:treeNode type=\"song\" iconLeaf=\"/images/tree/song.gif\" icon=\"/images/tree/song.gif\">", };
-
- abstractTestSource(3, "View Source", strings);
- }
-
- /**
* Tests selected tree. First it tries to expand "Chris Rea" node, checks
* its only child node, verifies that child's icon is displayed and expands
* it. Then it checks the number of nodes in "Chris Rea/The Road To Hell"
@@ -179,26 +179,26 @@
// click 'The Road to Hell'
selenium.click(format(LOC_NODE_1_1_LINK_PREFORMATTED, index));
-
+
// check the number of nodes
waitForElement(format(LOC_NODE_1_1_4_LABEL_PREFORMATTED, index));
- int numberOfNodes = selenium.getXpathCount(format(LOC_CHILDREN_1_1_PREFORMATTED, index)).intValue();
+ int numberOfNodes = getJQueryCount(format(LOC_CHILDREN_1_1_PREFORMATTED, index));
assertEquals(numberOfNodes, MSG_CHILDREN_COUNT_1_1, "Number of children of node 1.1.");
// get all nodes
String label = null;
- for (int i = 0; i < numberOfNodes; i++) {
- label = selenium.getText(format(LOC_NODE_1_1_N_LABEL_PREFORMATTED, index, i + 1));
+ for (int i = 0; i < 11; i++) {
+ label = selenium.getText(format(LOC_NODE_1_1_N_LABEL_PREFORMATTED, index, i));
assertEquals(label, MSG_NODE_1_1_N_LABEL[i], format("Node 1.1.{0} should have name {1}.", i + 1, MSG_NODE_1_1_N_LABEL[0]));
}
// check the number of expanded nodes on first level
- numberOfNodes = selenium.getXpathCount(format(LOC_CHILDREN_1_PREFORMATTED, index)).intValue();
+ numberOfNodes = getJQueryCount(format(LOC_CHILDREN_1_PREFORMATTED, index));
assertEquals(numberOfNodes, MSG_CHILDREN_COUNT_TOP, format("There should be {0} top nodes.", MSG_CHILDREN_COUNT_TOP));
// check that only the first node is expanded
- for (int i = 2; i < 5; i++) {
- assertFalse(isDisplayed(format(LOC_NODE_N_PREFORMATTED, index, i)), format("Node nr. {0} should be collapsed.", i));
+ for (int i = 1; i < 4; i++) {
+ assertFalse(isDisplayed(format(LOC_NODE_N_PREFORMATTED, index, i)), format("Node nr. {0} should be collapsed.", i+1));
}
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/contextMenu/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/contextMenu/locators.properties 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/contextMenu/locators.properties 2009-11-05 13:45:22 UTC (rev 15838)
@@ -1,20 +1,20 @@
# ContextMenuImageTestCase
-FIRST_HEADER=//fieldset[1]/legend
-FIRST_IMAGE=//fieldset[1]/div/table//tr/td/span/img
-FIRST_CONTEXT_MENU=//fieldset[1]/div/table//tr/td/span/div/div/div
-FIRST_ZOOM_IN=//div[@id='zin']
-FIRST_ZOOM_OUT=//div[@id='zout']
+FIRST_HEADER=jquery=fieldset:eq(0) > legend
+FIRST_IMAGE=jquery=img#pic
+FIRST_CONTEXT_MENU=jquery=fieldset:eq(0) div[id$=menu]
+FIRST_ZOOM_IN=jquery=div#zin
+FIRST_ZOOM_OUT=jquery=div#zout
# ContextMenuTableTestCase
-SECOND_EXAMPLE_HEADER=//fieldset[2]/legend
-SECOND_CONTEXT_MENU=//fieldset[2]/div/form/div/div/div[1]
-SECOND_LAST_MENU_ACTION=//fieldset[2]/div/form/table/tbody/tr/td[2]/span/div/div[2]
+SECOND_EXAMPLE_HEADER=jquery=fieldset:eq(1) > legend
+SECOND_CONTEXT_MENU=jquery=fieldset:eq(1) div[id=subview:form:menu_menu]
+SECOND_LAST_MENU_ACTION=jquery=fieldset:eq(1) form div[id$=body]
-SECOND_CAR_DETAILS=//fieldset[2]/div/form/div/div/div[1]/div/div[1]/span[2]
-SECOND_ACTIONS=//fieldset[2]/div/form/div/div/div[2]
-SECOND_ACTION_PREFORMATTED=//fieldset[2]/div/form/div/div/div[2]/div/div[{0}]/span[2]
+SECOND_CAR_DETAILS=jquery=fieldset:eq(1) div.rich-menu-list-bg:eq(0) > div:eq(0) > span[id$=anchor]
+SECOND_ACTIONS=jquery=fieldset:eq(1) div[id$=menu]
+SECOND_ACTION_PREFORMATTED=jquery=fieldset:eq(1) div.rich-menu-list-bg:eq(1) > div:eq({0}) > span[id$=anchor]
-SECOND_LINE_3_COLUMN_1=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr[3]/td[1]
-SECOND_LINE_3_COLUMN_2=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr[3]/td[2]
-SECOND_LINE_6_COLUMN_2=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr[6]/td[2]
-SECOND_LINE_1_COLUMN_3=//fieldset[2]/div/form/table/tbody/tr/td[1]/table/tbody/tr[1]/td[3]
\ No newline at end of file
+SECOND_LINE_3_COLUMN_1=jquery=fieldset:eq(1) tbody[id$=subview:form:table:tb] > tr:eq(2) > td:eq(0)
+SECOND_LINE_3_COLUMN_2=jquery=fieldset:eq(1) tbody[id$=subview:form:table:tb] > tr:eq(2) > td:eq(1)
+SECOND_LINE_6_COLUMN_2=jquery=fieldset:eq(1) tbody[id$=subview:form:table:tb] > tr:eq(5) > td:eq(1)
+SECOND_LINE_1_COLUMN_3=jquery=fieldset:eq(1) tbody[id$=subview:form:table:tb] > tr:eq(0) > td:eq(2)
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/dropDownMenu/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/dropDownMenu/locators.properties 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/dropDownMenu/locators.properties 2009-11-05 13:45:22 UTC (rev 15838)
@@ -1,9 +1,9 @@
-FIRST_EXAMPLE_HEADER=//fieldset[1]/legend
-FIRST_CURRENT_SELECTION=//fieldset[1]/div/span/span
-FIRST_MENU=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div[2]/div[1]
-FIRST_MENU_NEW=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div[2]/div/div/div[1]
-FIRST_MENU_SAVE_ALL=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div[2]/div[2]/div/div[2]
-FIRST_MENU_SEPARATOR=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div[2]/div[1]/div/div[5]
-FIRST_MENU_IMAGE=//fieldset[1]/div/form/table/tbody/tr/td[1]/div/div[1]/img
-FIRST_MENU_LINK_HOMEPAGE=//fieldset[1]/div/form/table/tbody/tr/td[2]/div/div[2]/div/div/div[1]/span[2]/a
-FIRST_MENU_LINK_FORUM=//fieldset[1]/div/form/table/tbody/tr/td[2]/div/div[2]/div/div/div[2]/span[2]/a
\ No newline at end of file
+FIRST_EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+FIRST_CURRENT_SELECTION=jquery=fieldset:eq(0) > div > span > span
+FIRST_MENU=jquery=fieldset:eq(0) td.rich-toolbar-item:eq(0) div[id$=menu]:eq(0)
+FIRST_MENU_NEW=jquery=fieldset:eq(0) td.rich-toolbar-item:eq(0) div[id$=menu]:eq(0) div.rich-menu-item:eq(0)
+FIRST_MENU_SAVE_ALL=jquery=fieldset:eq(0) td.rich-toolbar-item:eq(0) div[id$=menu]:eq(1) div.rich-menu-item:eq(1)
+FIRST_MENU_SEPARATOR=jquery=fieldset:eq(0) td.rich-toolbar-item:eq(0) div[id$=menu]:eq(0) div.rich-menu-separator
+FIRST_MENU_IMAGE=jquery=fieldset:eq(0) img.pic
+FIRST_MENU_LINK_HOMEPAGE=jquery=fieldset:eq(0) a:eq(0)
+FIRST_MENU_LINK_FORUM=jquery=fieldset:eq(0) a:eq(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/tree/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/locators.properties 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/locators.properties 2009-11-05 13:45:22 UTC (rev 15838)
@@ -1,18 +1,19 @@
# TreeTestCase -- first tab
-HEADER_PREFORMATTED=//fieldset[{0}]/legend
-NODE_1_LINK_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/table[1]/tbody/tr/td[1]/div/a
-NODE_1_1_LABEL_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div/table/tbody/tr/td[3]
-NODE_1_1_IMAGE_FIRST_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div/table/tbody/tr/td[1]/div/a/img[1]
-NODE_1_1_IMAGE_SECOND_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div/table/tbody/tr/td[1]/div/a/img[2]
-NODE_1_1_LINK_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div[1]/table[1]/tbody/tr/td[1]/div/a
-NODE_1_1_4_LABEL_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div[1]/div[1]/table[4]/tbody/tr/td[3]
-NODE_1_1_N_LABEL_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div[1]/div[1]/table[{1}]/tbody/tr/td[3]
-NODE_N_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div[{1}]
-CHILDREN_1_1_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/div[1]/div[1]/table
-CHILDREN_1_PREFORMATTED=//fieldset[{0}]/div/form/div/div[1]/table
+HEADER_PREFORMATTED=jquery=fieldset:eq({0}) > legend
+NODE_1_LINK_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > table:eq(0) a
+NODE_1_1_LABEL_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) td:eq(2)
+NODE_1_1_IMAGE_FIRST_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) td:eq(0) img:eq(0)
+NODE_1_1_IMAGE_SECOND_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) td:eq(0) img:eq(1)
+NODE_1_1_LINK_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) td:eq(0) a
+NODE_1_1_4_LABEL_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) > div:eq(0) > table:eq(3) td:eq(2)
+NODE_1_1_N_LABEL_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) > div:eq(0) > table:eq({1}) td:eq(2)
+NODE_N_PREFORMATTED=jquery=fieldset:eq({0}) > div > form > div > div:eq(0) > div:eq({1})
+CHILDREN_1_1_PREFORMATTED=jquery=fieldset:eq({0}) div[id$=childs]:eq(0) > div:eq(0) > div:eq(0) > table
+CHILDREN_1_PREFORMATTED=jquery=fieldset:eq({0}) > div > form > div > div:eq(0) > table
# TreeNodesAdaptorTestCase
-EXAMPLE_HEADER=//fieldset[1]/legend
-TABLE_SUBNODES=//fieldset[1]/div/form/div/div[1]/div/div/table
-DEMO_NODE=//fieldset[1]/div/form/div/div[1]/div/div/table[1]/tbody/tr/td[1]/div/a
-DIV_SUBNODES_PREFORMATTED=//fieldset[1]/div/form/div/div[1]/div/div/div{0,choice,0#|1#[{0}]}
\ No newline at end of file
+EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+TABLE_SUBNODES=jquery=fieldset:eq(0) div.rich-tree-node-children div.rich-tree-node-children table.rich-tree-node
+DEMO_NODE=jquery=fieldset:eq(0) div.rich-tree-node-children div.rich-tree-node-children > table:eq(0) a
+DIV_SUBNODES=jquery=fieldset:eq(0) div.rich-tree-node-children div.rich-tree-node-children > div
+DIV_SUBNODES_PREFORMATTED=jquery=fieldset:eq(0) div.rich-tree-node-children div.rich-tree-node-children > div:eq({0})
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/messages.properties 2009-11-05 13:42:18 UTC (rev 15837)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/tree/messages.properties 2009-11-05 13:45:22 UTC (rev 15838)
@@ -1,17 +1,17 @@
# TreeTestCase -- first tab
-NODE_1_1_1_LABEL=The Road To Hell (Part 1)
-NODE_1_1_2_LABEL=The Road To Hell (Part 2)
-NODE_1_1_3_LABEL=You Must Be Evil
-NODE_1_1_4_LABEL=Texas
-NODE_1_1_5_LABEL=Looking For A Rainbow
-NODE_1_1_6_LABEL=Your Warm And Tender Love
-NODE_1_1_7_LABEL=Daytona
-NODE_1_1_8_LABEL=That`s What They Always Say
-NODE_1_1_9_LABEL=Let`s Dance
-NODE_1_1_10_LABEL=I Just Wanna Be With You
-NODE_1_1_11_LABEL=Tell Me There`s A Heaven
-NODE_1_1_LABEL=The Road To Hell
-CHILDREN_COUNT_1_1=11
+NODE_1_1_1_LABEL=Yes Sir, I Can Boogie
+NODE_1_1_2_LABEL=Sorry, i`m A Lady
+NODE_1_1_3_LABEL=A Quien Le Importa
+NODE_1_1_4_LABEL=The Devil Send You To Laredo
+NODE_1_1_5_LABEL=Ni Mas Ni Menos
+NODE_1_1_6_LABEL=Parlez-vous Francais?
+NODE_1_1_7_LABEL=Que Naadie Sepa Mi Sufrir
+NODE_1_1_8_LABEL=Borriquito
+NODE_1_1_9_LABEL=Love Me Please Love Me
+NODE_1_1_10_LABEL=Paloma Blanca
+NODE_1_1_11_LABEL=Me Tienes Desenganada
+NODE_1_1_LABEL=Grand Collection
+CHILDREN_COUNT_1_1=14
CHILDREN_COUNT_TOP=4
15 years, 1 month
JBoss Rich Faces SVN: r15837 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: resources and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2009-11-05 08:42:18 -0500 (Thu, 05 Nov 2009)
New Revision: 15837
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/status/StatusTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml
Log:
* Test cases for media output, paint 2D and status disabled in testng.xml.
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/status/StatusTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/status/StatusTestCase.java 2009-11-05 10:58:17 UTC (rev 15836)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/status/StatusTestCase.java 2009-11-05 13:42:18 UTC (rev 15837)
@@ -61,7 +61,7 @@
*/
// TODO investigate JavaScript injecting to fix this, see
// https://jira.jboss.org/jira/browse/JBQA-2606
- // @Test
+ @Test
public void testTextStatus() {
doStatusTesting(1);
}
@@ -77,7 +77,7 @@
*/
// TODO investigate JavaScript injecting to fix this, see
// https://jira.jboss.org/jira/browse/JBQA-2606
- // @Test
+ @Test
public void testImageStatus() {
doStatusTesting(2);
}
@@ -135,7 +135,7 @@
*/
// TODO investigate JavaScript injecting to fix testInputsStatus, see
// https://jira.jboss.org/jira/browse/JBQA-2606
- // @Test
+ @Test
public void testInputsStatus() {
scrollIntoView(format(LOC_FIELDSET_PAGE_PART_PREFORMATTED, 3), true);
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml 2009-11-05 10:58:17 UTC (rev 15836)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/testng.xml 2009-11-05 13:42:18 UTC (rev 15837)
@@ -343,13 +343,13 @@
</classes>
</test>
- <test
- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase">
- <classes>
- <class
- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase" />
- </classes>
- </test>
+<!-- <test-->
+<!-- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase">-->
+<!-- <classes>-->
+<!-- <class-->
+<!-- name="org.jboss.richfaces.integrationTest.mediaOutput.MediaOutputTestCase" />-->
+<!-- </classes>-->
+<!-- </test>-->
<test
name="org.jboss.richfaces.integrationTest.modalPanel.ModalPanelTestCase">
@@ -375,11 +375,11 @@
</classes>
</test>
- <test name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase">
- <classes>
- <class name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase" />
- </classes>
- </test>
+<!-- <test name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase">-->
+<!-- <classes>-->
+<!-- <class name="org.jboss.richfaces.integrationTest.paint2d.Paint2DTestCase" />-->
+<!-- </classes>-->
+<!-- </test>-->
<test
name="org.jboss.richfaces.integrationTest.panel.PanelCustomizationTestCase">
@@ -488,11 +488,11 @@
</classes>
</test>
- <test name="org.jboss.richfaces.integrationTest.status.StatusTestCase">
- <classes>
- <class name="org.jboss.richfaces.integrationTest.status.StatusTestCase" />
- </classes>
- </test>
+<!-- <test name="org.jboss.richfaces.integrationTest.status.StatusTestCase">-->
+<!-- <classes>-->
+<!-- <class name="org.jboss.richfaces.integrationTest.status.StatusTestCase" />-->
+<!-- </classes>-->
+<!-- </test>-->
<test name="org.jboss.richfaces.integrationTest.style.StyleTestCase">
<classes>
15 years, 1 month
JBoss Rich Faces SVN: r15836 - root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 05:58:17 -0500 (Thu, 05 Nov 2009)
New Revision: 15836
Removed:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ProcessRowHolder.java
Log:
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ProcessRowHolder.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ProcessRowHolder.java 2009-11-05 10:51:45 UTC (rev 15835)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/ProcessRowHolder.java 2009-11-05 10:58:17 UTC (rev 15836)
@@ -1,28 +0,0 @@
-package org.richfaces.renderkit;
-
-import javax.faces.component.UIComponent;
-
-public class ProcessRowHolder {
-
- private UIComponent component;
-
- private int processRow;
-
-
- public int getProcessRow() {
- return processRow;
- }
-
- public void setProcessRow(int processRow) {
- this.processRow = processRow;
- }
-
- public ProcessRowHolder(UIComponent component) {
- this.component = component;
- }
-
- public int nextRow(){
- return ++processRow;
- }
-
-}
15 years, 1 month
JBoss Rich Faces SVN: r15835 - root/examples-sandbox/trunk/components/tables/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-11-05 05:51:45 -0500 (Thu, 05 Nov 2009)
New Revision: 15835
Modified:
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Log:
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 10:50:08 UTC (rev 15834)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-05 10:51:45 UTC (rev 15835)
@@ -12,7 +12,7 @@
<h:body>
<h:form id="form1">
- <rich:simpleDataTable var="record" value="#{dataBean.employeeList}" rows="20" style="border: 1px solid grey">
+ <rich:simpleDataTable var="record" value="#{dataBean.employeeList}" rows="20">
<f:facet name="caption">
<h:outputText id="captioFacet1" value="Caption Facet" />
</f:facet>
15 years, 1 month