JBoss Rich Faces SVN: r10825 - in trunk/framework: impl/src/main/java/org/ajax4jsf and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-19 11:26:35 -0400 (Sun, 19 Oct 2008)
New Revision: 10825
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java
trunk/framework/impl/src/main/java/org/ajax4jsf/model/
trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java
trunk/framework/test/src/test/java/org/ajax4jsf/model/
Log:
Legacy queue-related classes removed
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java 2008-10-19 15:17:09 UTC (rev 10824)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java 2008-10-19 15:26:35 UTC (rev 10825)
@@ -1,23 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.model;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public interface Queue {
-
- String getName();
-
- Integer getRequestDelay();
-
- Integer getTimeout();
-
- Boolean getLimitToList();
-
- Boolean getIgnoreDupResponses();
-
- boolean isTransient();
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java 2008-10-19 15:17:09 UTC (rev 10824)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java 2008-10-19 15:26:35 UTC (rev 10825)
@@ -1,70 +0,0 @@
-package org.ajax4jsf.model;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class QueuesManager {
-
- static private final String MAP_KEY_PREFIX = QueuesManager.class.getSimpleName();
-
- static public void put(Queue queue, FacesContext context) throws IllegalArgumentException{
- if (context == null) {
- context = FacesContext.getCurrentInstance();
- }
- String name = queue.getName();
- String key = MAP_KEY_PREFIX + name;
- Map<String, Object> attributes = context.getViewRoot().getAttributes();
- if (!attributes.containsKey(key)) {
- attributes.put(key, queue);
- } else {
- throw new IllegalArgumentException("Queue with name '" + name + "' has already been used");
- }
- }
-
- static public void put(Queue queue) throws IllegalArgumentException {
- put(queue, null);
- }
-
- static public Queue get(String name, FacesContext context) {
- if (context == null) {
- context = FacesContext.getCurrentInstance();
- }
- Object object = context.getViewRoot().getAttributes().get(MAP_KEY_PREFIX + name);
- return (Queue)object;
- }
-
- static public Queue get(String name) {
- return get(name, null);
- }
-
- static public Queue remove(String name, FacesContext context) {
- if (context == null) {
- context = FacesContext.getCurrentInstance();
- }
- Object object = context.getViewRoot().getAttributes().remove(MAP_KEY_PREFIX + name);
- return (Queue)object;
- }
-
- static public Queue remove(String name) {
- return remove(name, null);
- }
-
- static public void clean(FacesContext context) {
- if (context == null) {
- context = FacesContext.getCurrentInstance();
- }
- for (Iterator<Map.Entry<String, Object>> iterator = context.getViewRoot()
- .getAttributes().entrySet().iterator(); iterator.hasNext();) {
- Map.Entry<String, Object> entry = (Map.Entry<String, Object>) iterator.next();
- if (entry.getKey().startsWith(MAP_KEY_PREFIX)) {
- iterator.remove();
- }
- }
- }
-}
Deleted: trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java 2008-10-19 15:17:09 UTC (rev 10824)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java 2008-10-19 15:26:35 UTC (rev 10825)
@@ -1,40 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.tests;
-
-import org.ajax4jsf.model.Queue;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class MockQueue implements Queue {
-
- public String getName() {
- return "name";
- }
-
- public Integer getRequestDelay() {
- return 1;
- }
-
- public Integer getTimeout() {
- return 2;
- }
-
-
- public Boolean getIgnoreDupResponses() {
- return true;
- }
-
- public Boolean getLimitToList() {
- return false;
- }
-
- public boolean isTransient() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
17 years, 2 months
JBoss Rich Faces SVN: r10824 - in trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder: mojo and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-19 11:17:09 -0400 (Sun, 19 Oct 2008)
New Revision: 10824
Modified:
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenXMLMerge.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/VelocityTaglibMergeCallBack.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/XMLMergeCallback.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/SkinInfo.java
trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/velocity/ResourceLoader.java
Log:
https://jira.jboss.org/jira/browse/RF-4578
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenXMLMerge.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenXMLMerge.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/MavenXMLMerge.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.maven;
import java.io.File;
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/VelocityTaglibMergeCallBack.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/VelocityTaglibMergeCallBack.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/VelocityTaglibMergeCallBack.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.maven;
import java.io.File;
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/XMLMergeCallback.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/XMLMergeCallback.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/maven/XMLMergeCallback.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.maven;
/**
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/CreateSkinMojo.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.mojo;
import java.io.File;
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/GenerateTestMojo.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.mojo;
import org.ajax4jsf.builder.config.BuilderConfig;
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/SkinInfo.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/SkinInfo.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/mojo/SkinInfo.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.mojo;
import java.util.ArrayList;
Modified: trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/velocity/ResourceLoader.java
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/velocity/ResourceLoader.java 2008-10-19 15:16:30 UTC (rev 10823)
+++ trunk/cdk/maven-cdk-plugin/src/main/java/org/ajax4jsf/builder/velocity/ResourceLoader.java 2008-10-19 15:17:09 UTC (rev 10824)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.velocity;
import java.io.InputStream;
17 years, 2 months
JBoss Rich Faces SVN: r10823 - in trunk/cdk/generator/src: main/java/org/ajax4jsf/builder/generator and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-19 11:16:30 -0400 (Sun, 19 Oct 2008)
New Revision: 10823
Modified:
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagTestClassHolder.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator2.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodyMerge.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodySerializer.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XPathComparator.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/vcp/AjaxRenderedAreaElement.java
trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyMergeTest.java
trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodySerializerTest.java
trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XPathComparatorTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4578
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ComponentBaseBean.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.config;
import java.beans.PropertyDescriptor;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ConverterBean.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.config;
public class ConverterBean extends ComponentBaseBean {
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagTestClassHolder.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagTestClassHolder.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TagTestClassHolder.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.config;
/**
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/TestClassHolder.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.config;
/**
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/ValidatorBean.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.config;
public class ValidatorBean extends ComponentBaseBean {
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/ComponentTestGenerator.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.generator;
import java.io.BufferedWriter;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TagTestGenerator.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.ajax4jsf.builder.generator;
import java.io.BufferedWriter;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.generator;
import java.util.Date;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator2.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator2.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/generator/TestDataGenerator2.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.generator;
import java.util.HashMap;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodyMerge.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodyMerge.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodyMerge.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import java.util.ArrayList;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodySerializer.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodySerializer.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XMLBodySerializer.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import java.io.StringWriter;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XPathComparator.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XPathComparator.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/xml/XPathComparator.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import java.util.Comparator;
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/vcp/AjaxRenderedAreaElement.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/vcp/AjaxRenderedAreaElement.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/vcp/AjaxRenderedAreaElement.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.templatecompiler.elements.vcp;
import org.ajax4jsf.templatecompiler.builder.CompilationContext;
Modified: trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyMergeTest.java
===================================================================
--- trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyMergeTest.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodyMergeTest.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import junit.framework.TestCase;
Modified: trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodySerializerTest.java
===================================================================
--- trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodySerializerTest.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XMLBodySerializerTest.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import java.io.ByteArrayInputStream;
Modified: trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XPathComparatorTest.java
===================================================================
--- trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XPathComparatorTest.java 2008-10-17 16:41:48 UTC (rev 10822)
+++ trunk/cdk/generator/src/test/java/org/ajax4jsf/builder/xml/XPathComparatorTest.java 2008-10-19 15:16:30 UTC (rev 10823)
@@ -1,6 +1,24 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
package org.ajax4jsf.builder.xml;
import java.io.ByteArrayInputStream;
17 years, 2 months
JBoss Rich Faces SVN: r10822 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/simpleTogglePanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-10-17 12:41:48 -0400 (Fri, 17 Oct 2008)
New Revision: 10822
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelChildProcessingTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
Log:
SimpleTogglePanel: children components aren't processed for server-aware modes and closed panel
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-10-17 16:29:09 UTC (rev 10821)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2008-10-17 16:41:48 UTC (rev 10822)
@@ -36,14 +36,33 @@
private boolean rendered;
- private String content = "content";
+ private String content;
+ private String switchType = "server";
+
public RichPanelTestBean() {
value = "";
value2 = 0;
rendered = true;
+ content = "content";
}
+ /**
+ * Gets value of switchType field.
+ * @return value of switchType field
+ */
+ public String getSwitchType() {
+ return switchType;
+ }
+
+ /**
+ * Set a new value for switchType field.
+ * @param switchType a new value for switchType field
+ */
+ public void setSwitchType(String switchType) {
+ this.switchType = switchType;
+ }
+
public String getValue() {
return value;
}
@@ -154,7 +173,25 @@
public void hide() {
rendered = false;
}
+
+ public void reset2Server() {
+ cleanValues();
+ content = "";
+ switchType = "server";
+ }
+ public void reset2Ajax() {
+ cleanValues();
+ content = "";
+ switchType = "ajax";
+ }
+
+ public void reset2Client() {
+ cleanValues();
+ content = "";
+ switchType = "client";
+ }
+
public void cleanValues() {
value = "";
value2 = 0;
@@ -162,5 +199,6 @@
panelValue2 = null;
itemAction = "";
rendered = true;
+ content = "content";
}
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelChildProcessingTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/simpleTogglePanel/simpleTogglePanelChildProcessingTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-10-17 16:29:09 UTC (rev 10821)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-10-17 16:41:48 UTC (rev 10822)
@@ -34,6 +34,10 @@
private static Map<String, String> params = new HashMap<String, String>();
+ private final static String CHILD_PROCESSING_TEST_URL = "pages/simpleTogglePanel/simpleTogglePanelChildProcessingTest.xhtml";
+
+ private final static String RESET_METHOD = "#{panelBean.cleanValues}";
+
static {
params.put("parameter1", "value1");
params.put("parameter2", "value2");
@@ -42,7 +46,7 @@
@Test
public void testSimpleTogglePanelComponent(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
String parentId = getParentId() + "_form:";
String inputId = parentId + "_value";
String outputId = parentId + "_value2";
@@ -92,7 +96,7 @@
@Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test component with rendered = false is not present on the page");
tester.testRendered();
}
@@ -100,7 +104,7 @@
@Test
public void testReRenderAttribute(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test component re-renders another components");
tester.testReRender();
}
@@ -108,7 +112,7 @@
@Test
public void testLimitToListAttribute(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test component with limitToList = true skips ajaxRendered areas update");
tester.testLimitToList();
}
@@ -116,7 +120,7 @@
@Test
public void testBypassUpdatesAttribute(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test component with bypassUpdates = true skips update model values phase");
tester.testBypassUpdate();
}
@@ -124,7 +128,7 @@
@Test
public void testNestedParams(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test component encodes nested f:param tags and their values are present as request parameters");
tester.testRequestParameters(params);
}
@@ -150,7 +154,7 @@
@Test
public void testAjaxSingle(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test ajaxSingle attribute");
tester.testAjaxSingle();
}
@@ -158,7 +162,7 @@
@Test
public void testAjaxSingleWithInternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test ajaxSingle attribute in case of invalid children state");
tester.testAjaxSingleWithInternalValidationFailed();
}
@@ -166,7 +170,7 @@
@Test
public void testImmediate(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test immediate attribute");
tester.testImmediate();
}
@@ -174,11 +178,51 @@
@Test
public void testImmediateWithExternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, RESET_METHOD);
writeStatus("Test immediate attribute with external validation failed");
tester.testImmediateWithExternalValidationFailed();
}
+ @Test
+ public void testChildProcessingServerCase(Template template) {
+ renderPage(CHILD_PROCESSING_TEST_URL, template, "#{panelBean.reset2Server}");
+ writeStatus("Check children components processing for server mode");
+
+ String parentId = getParentId() + "_form:";
+
+ String panelId = parentId + "panel_header";
+ String luckId = parentId + "_luck";
+ String childId = parentId + "_child";
+ String ajaxSubmit = parentId + "_ajaxSubmit";
+ String fullSubmit = parentId + "_fullSubmit";
+
+ clickAjaxCommandAndWait(ajaxSubmit);
+ AssertTextEquals(luckId, "1", "Panel is server-aware and closed! Invalid child components must not be processed");
+
+ clickCommandAndWait(fullSubmit);
+ AssertTextEquals(luckId, "2", "Panel is server-aware and closed! Invalid child components must not be processed");
+
+ clickCommandAndWait(panelId);
+ AssertTextEquals(luckId, "3", "Panel is server-aware and closed! Invalid child components must not be processed");
+
+ clickAjaxCommandAndWait(ajaxSubmit);
+ AssertTextEquals(luckId, "3", "Panel is server-aware and open! Invalid child components must be processed");
+
+ clickCommandAndWait(fullSubmit);
+ AssertTextEquals(luckId, "3", "Panel is server-aware and open! Invalid child components must be processed");
+
+ type(childId, "valid");
+
+ clickAjaxCommandAndWait(ajaxSubmit);
+ AssertTextEquals(luckId, "4", "Panel is server-aware and open! Valid child components must be processed");
+
+ clickCommandAndWait(fullSubmit);
+ AssertTextEquals(luckId, "1", "Panel is server-aware and open! Valid child components must be processed");
+
+ clickCommandAndWait(panelId);
+ AssertTextEquals(luckId, "2", "Panel is server-aware and open! Valid child components must be processed");
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "_header");
17 years, 2 months
JBoss Rich Faces SVN: r10821 - in trunk/docs/cdkguide/en/src/main: docbook/modules and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-17 12:29:09 -0400 (Fri, 17 Oct 2008)
New Revision: 10821
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml
trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - 'Generating unit tests' chapter creation
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml 2008-10-17 11:10:54 UTC (rev 10820)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ui_conf.xml 2008-10-17 16:29:09 UTC (rev 10821)
@@ -93,7 +93,7 @@
<programlisting role="XML"><![CDATA[...
<property>
<name>value</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>
The value of the component
</description>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml 2008-10-17 11:10:54 UTC (rev 10820)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/test.xml 2008-10-17 16:29:09 UTC (rev 10821)
@@ -11,6 +11,98 @@
</chapterinfo>
<title>Generating unit tests</title>
<para>
- Work in progress...
+ Unit testing is a method of testing that verifies the individual units of source code are working properly.
+ A unit is the smallest testable part of an application, method for example.
+ </para>
+ <para>
+ The goal of unit testing is to isolate each part of the program and show that the individual parts are correct.
+ Unit tests find problems early in the development cycle and allow you
+ to perform code refactoring at a later date, and make sure the module still works correctly.
+ By testing the parts of a program first and then testing the sum of its parts, integration testing becomes much easier.
+ </para>
+ <para>
+ Unit testing provides a sort of living documentation of the system. You could learn unit functionality
+ by looking at the unit test and get a basic understanding of the unit API.
</para>
+ <note>
+ <title>Note:</title>
+ <para>
+ Unit testing cannot be expected to catch every error in the program.
+ It only tests the functionality of the units themselves.
+ Therefore it is more effective if the other software testing activities
+ are used in conjunction with unit tests.
+ </para>
+ </note>
+ <para>
+ Unit tests generated by CDK check all the properties of the component, resources availability,
+ and perform render test view.
+ </para>
+ <para>
+ In order to add unit tests to the project you should
+ take the following steps:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ proceed to the <property>inputDate/src/main/config/component</property> directory,
+ open the <property>inputDate.xml</property> file
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ add the <emphasis role="bold"><property><test></property></emphasis> element nested to
+ <emphasis role="bold"><property><component></property></emphasis> in order to generate
+ unit test for the <property>UIInputDate</property> class
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<test>
+ <classname>org.richfaces.component.html.HtmlInputDateComponentTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+</test>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ add the <emphasis role="bold"><property><test /></property></emphasis> element nested to
+ <emphasis role="bold"><property><tag></property></emphasis> in order to generate
+ unit test for the <property>InputDateTag</property> class
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<tag>
+ <name>inputDate</name>
+ <classname>org.mycompany.taglib.InputDateTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ <test/>
+</tag>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ proceed to the <property>inputDate</property> directory,
+ and add new execution with the <property>generate-tests</property> goal to <property>pom.xml</property>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+</execution>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ launch the following command in the <property>inputDate</property> directory
+ </para>
+ <programlisting role="XML"><![CDATA[mvn clean install]]></programlisting>
+ </listitem>
+ </itemizedlist>
+ <para>
+ If all the tests have been run successfully, the "BUILD SUCCESSFUL" message will appeared.
+ </para>
+ <para>
+ You could also find detailed tests information in the <property>surefire reports</property> placed in the
+ <property>inputDate/target/surefire-reports</property> directory.
+ </para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml 2008-10-17 11:10:54 UTC (rev 10820)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xml 2008-10-17 16:29:09 UTC (rev 10821)
@@ -29,7 +29,7 @@
<property>
<name>value</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>
The value of the component
</description>
17 years, 2 months
JBoss Rich Faces SVN: r10820 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/listShuttle and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-10-17 07:10:54 -0400 (Fri, 17 Oct 2008)
New Revision: 10820
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
sourceValue/targetValue updated, listener fire
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-17 10:38:34 UTC (rev 10819)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-17 11:10:54 UTC (rev 10820)
@@ -4,6 +4,7 @@
import java.util.List;
import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
import org.ajax4jsf.model.ListShuttleItem;
@@ -20,6 +21,7 @@
private boolean rendered;
private boolean immediate;
private String string;
+ private boolean valueChangeListener;
public ListShuttleBean() {
init();
@@ -32,7 +34,9 @@
switchByClick = false;
rendered = true;
immediate = false;
+ valueChangeListener = false;
string = "something";
+ valueChangeListener = false;
items = new ArrayList<ListShuttleItem>();
freeItems = new ArrayList<ListShuttleItem>();
for (int i = 0; i < 5; i++) {
@@ -134,4 +138,14 @@
public void setString(String string) {
this.string = string;
}
+
+ public void valueChangeListener(ValueChangeEvent event) {
+ valueChangeListener = true;
+ }
+
+ public void submit() {
+ if (valueChangeListener) {
+ string = "value was changed";
+ }
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-17 10:38:34 UTC (rev 10819)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-17 11:10:54 UTC (rev 10820)
@@ -22,6 +22,10 @@
String lsId;
+ String sourceTableId;
+
+ String targetTableId;
+
String availebleListId;
String targetListId;
@@ -69,6 +73,8 @@
parentId = getParentId() + "_form:";
inputTextId = parentId + "inputTextId";
lsId = parentId + "ls";
+ sourceTableId = parentId + "sourceTableId";
+ targetTableId = parentId + "targetTableId";
availebleListId = parentId + "lstbody";
targetListId = parentId + "lstlTbody";
copyAllId = parentId + "lscopyAll";
@@ -92,7 +98,26 @@
immediateId = attrFormId + ":immediateId";
}
+
/**
+ * sourceValue/targetValue updated, listener fire
+ */
+ @Test
+ public void testValuesAndListener(Template template) {
+ init(template);
+ Assert.assertEquals(getValueById(inputTextId), "something", "Value of inputText(id='inputTextId') must equal initial value('something').");
+ _assertTableRowsCount(sourceTableId, 5);
+ _assertTableRowsCount(targetTableId, 0);
+
+ clickById(copyAllId);
+ clickAjaxCommandAndWait(submitId);
+
+ Assert.assertEquals(getValueById(inputTextId), "value was changed", "Value of inputText(id='inputTextId') must equal changed value('value was changed').");
+ _assertTableRowsCount(sourceTableId, 0);
+ _assertTableRowsCount(targetTableId, 5);
+ }
+
+ /**
* immediate = true component works respectively
*/
@Test
@@ -136,7 +161,7 @@
/**
* JS API is present and works
*/
- // @Test
+// @Test
public void testJSAPI(Template template) {
//TODO JS API has some bugs. This test case should be completed after fixing theirs.
init(template);
17 years, 2 months
JBoss Rich Faces SVN: r10819 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-10-17 06:38:34 -0400 (Fri, 17 Oct 2008)
New Revision: 10819
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
Log:
just formatting
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-17 10:22:55 UTC (rev 10818)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-17 10:38:34 UTC (rev 10819)
@@ -15,374 +15,377 @@
import org.testng.Assert;
/**
- * Class provides scope of mehods for automatic test of standard ajax attrs
+ * Class provides scope of mehods for automatic test of standard ajax attrs
+ *
* @author Andrey Markavtsov
- *
+ *
*/
public class AutoTester {
-
- private static final String AUTOTEST_CONTROLS_FORM_ID = "autoTestControlForm:";
-
- private static final String AUTOTEST_FORM_ID = "autoTestForm:";
-
- private static final String INPUT_ID = "_auto_input";
-
- public static final String STATUS_ID = "_auto_status";
-
- private static final String TIME_ID = "_auto_time";
-
- public static final String COMPONENT_ID = "componentId";
-
- private static final String PARAMS_MAP_VAR_NAME = "requestParamsMap";
-
-// /private String componentName;
-
- SeleniumTestBase base;
-
- public AutoTester(SeleniumTestBase base) {
- this.base = base;
- }
-
- public void renderPage(Template template, String resetMethodName) {
- base.renderAutoTestPage(template, resetMethodName);
- }
-
- public void testAllAjaxAttributes() {
- testRendered();
- testReRender();
- testActionListener();
- testAjaxSingle();
- testImmediate();
- testBypassUpdate();
- testExtrenalValidationFailure();
- testLimitToList();
- }
-
- public void testRendered() {
- reset();
- setupControl(TestSetupEntry.rendered, Boolean.FALSE);
- clickLoad();
-
- base.AssertNotPresent(getClientId(COMPONENT_ID), "Rendered attribute does not work");
- }
-
- public void testReRender() {
- reset();
- setupControl(TestSetupEntry.reRender, STATUS_ID + "," + TIME_ID);
- clickLoad();
-
- String text = base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID);
-
- base.sendAjax();
- base.AssertTextNotEquals(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID, text, "ReRender attribute does not work");
-
- String oncomplete = base.runScript("window._ajaxOncomplete");
- Assert.assertEquals("true", oncomplete, "Oncomplete attribute does not work.");
- }
-
- public void testActionListener() {
- reset();
- clickLoad();
-
- base.sendAjax();
+ private static final String AUTOTEST_CONTROLS_FORM_ID = "autoTestControlForm:";
- checkActionListener(true);
- checkUpdateModel(true);
- }
-
- public void testExtrenalValidationFailure() {
- reset();
- clickLoad();
+ private static final String AUTOTEST_FORM_ID = "autoTestForm:";
- setExtrenalValidationFailed();
- base.sendAjax();
-
- checkActionListener(false);
- checkUpdateModel(false);
- }
-
- public void testAjaxSingle() {
- reset();
- setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
- clickLoad();
-
- setExtrenalValidationFailed();
- base.sendAjax();
-
- checkActionListener(true);
- checkUpdateModel(false);
-
- }
+ private static final String INPUT_ID = "_auto_input";
- /**
- * Important! Override {@link SeleniumTestBase#setInternalValidationFailed()} method if you use this method
- */
- public void testAjaxSingleWithInternalValidationFailed() {
- reset();
- setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
- clickLoad();
+ public static final String STATUS_ID = "_auto_status";
- setInternalValidationFailed();
- base.sendAjax();
+ private static final String TIME_ID = "_auto_time";
- checkActionListener(false);
- checkUpdateModel(false);
+ public static final String COMPONENT_ID = "componentId";
+
+ private static final String PARAMS_MAP_VAR_NAME = "requestParamsMap";
+
+ // /private String componentName;
+
+ SeleniumTestBase base;
+
+ public AutoTester(SeleniumTestBase base) {
+ this.base = base;
+ }
+
+ public void renderPage(Template template, String resetMethodName) {
+ base.renderAutoTestPage(template, resetMethodName);
+ }
+
+ public void testAllAjaxAttributes() {
+ testRendered();
+ testReRender();
+ testActionListener();
+ testAjaxSingle();
+ testImmediate();
+ testBypassUpdate();
+ testExtrenalValidationFailure();
+ testLimitToList();
+ }
+
+ public void testRendered() {
+ reset();
+ setupControl(TestSetupEntry.rendered, Boolean.FALSE);
+ clickLoad();
+
+ base.AssertNotPresent(getClientId(COMPONENT_ID), "Rendered attribute does not work");
+ }
+
+ public void testReRender() {
+ reset();
+ setupControl(TestSetupEntry.reRender, STATUS_ID + "," + TIME_ID);
+ clickLoad();
+
+ String text = base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID);
+
+ base.sendAjax();
+ base.AssertTextNotEquals(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID, text,
+ "ReRender attribute does not work");
+
+ String oncomplete = base.runScript("window._ajaxOncomplete");
+ Assert.assertEquals("true", oncomplete, "Oncomplete attribute does not work.");
+ }
+
+ public void testActionListener() {
+ reset();
+ clickLoad();
+
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(true);
+ }
+
+ public void testExtrenalValidationFailure() {
+ reset();
+ clickLoad();
+
+ setExtrenalValidationFailed();
+ base.sendAjax();
+
+ checkActionListener(false);
+ checkUpdateModel(false);
+ }
+
+ public void testAjaxSingle() {
+ reset();
+ setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ clickLoad();
+
+ setExtrenalValidationFailed();
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(false);
+
+ }
+
+ /**
+ * Important! Override
+ * {@link SeleniumTestBase#setInternalValidationFailed()} method if you use
+ * this method
+ */
+ public void testAjaxSingleWithInternalValidationFailed() {
+ reset();
+ setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ clickLoad();
+
+ setInternalValidationFailed();
+ base.sendAjax();
+
+ checkActionListener(false);
+ checkUpdateModel(false);
+ }
+
+ public void testImmediate() {
+ reset();
+ setupControl(TestSetupEntry.immediate, Boolean.TRUE);
+ clickLoad();
+
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(false);
+
+ }
+
+ public void testImmediateWithExternalValidationFailed() {
+ reset();
+ setupControl(TestSetupEntry.immediate, Boolean.TRUE);
+ clickLoad();
+
+ setExtrenalValidationFailed();
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(false);
+
+ }
+
+ public void testBypassUpdate() {
+ reset();
+ setupControl(TestSetupEntry.bypassUpdate, Boolean.TRUE);
+ clickLoad();
+
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(false);
+ }
+
+ public void testLimitToList() {
+ reset();
+ setupControl(TestSetupEntry.limitToList, Boolean.TRUE);
+ clickLoad();
+
+ checkComponentReRendered();
+
+ reset();
+ setupControl(TestSetupEntry.limitToList, Boolean.TRUE);
+ setupControl(TestSetupEntry.reRender, STATUS_ID + "," + TIME_ID);
+ clickLoad();
+
+ String text = base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID);
+
+ checkComponentReRendered();
+
+ base.AssertTextNotEquals(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID, text, ""
+ + "LimitToList = true does not work. Component in reRender list was not rerendered");
+
+ }
+
+ public void testRequestParameters(Map<String, String> params) {
+ reset();
+ clickLoad();
+
+ base.sendAjax();
+
+ for (String name : params.keySet()) {
+ String value = base.runScript(PARAMS_MAP_VAR_NAME + "." + name);
+ if (value == null) {
+ Assert.fail("Parameter [" + name + "] is not present in ajax request");
+ } else if (!value.equals(params.get(name))) {
+ Assert.fail("Parameter [" + name + "] value is invalid. Expected [" + params.get(name) + "]. But was ["
+ + value + "]");
+ }
}
+ }
- public void testImmediate() {
- reset();
- setupControl(TestSetupEntry.immediate, Boolean.TRUE);
- clickLoad();
+ public void testNestedActionListener() {
+ reset();
+ clickLoad();
- base.sendAjax();
+ base.sendAjax();
- checkActionListener(true);
- checkUpdateModel(false);
-
- }
+ checkNestedActionListener(true);
+ }
- public void testImmediateWithExternalValidationFailed() {
- reset();
- setupControl(TestSetupEntry.immediate, Boolean.TRUE);
- clickLoad();
+ public void testOncomplete() {
+ reset();
+ clickLoad();
- setExtrenalValidationFailed();
- base.sendAjax();
+ base.sendAjax();
- checkActionListener(true);
- checkUpdateModel(false);
+ String oncomplete = base.runScript("window._ajaxOncomplete");
+ Assert.assertEquals("true", oncomplete, "Oncomplete attribute does not work.");
+ }
+
+ public void testStyleAndClasses(String[] classNames, Map<String, String> styleAttr) {
+ reset();
+ clickLoad();
+
+ String componentId = getClientId(COMPONENT_ID);
+
+ base.assertClassNames(componentId, classNames, "Component's rendering invalid", true);
+ base.assertStyleAttributes(componentId, styleAttr);
+ }
+
+ public void testHTMLEvents() {
+ String componentId = getClientId(COMPONENT_ID);
+ base.assertEvents(componentId, SeleniumEvent.STANDARD_HTML_EVENTS);
+ }
+
+ private void checkComponentReRendered() {
+ if (base.getReRendersId() == null) {
+ return;
}
- public void testBypassUpdate() {
- reset();
- setupControl(TestSetupEntry.bypassUpdate, Boolean.TRUE);
- clickLoad();
-
- base.sendAjax();
-
- checkActionListener(true);
- checkUpdateModel(false);
- }
-
- public void testLimitToList() {
- reset();
- setupControl(TestSetupEntry.limitToList, Boolean.TRUE);
- clickLoad();
-
- checkComponentReRendered();
-
- reset();
- setupControl(TestSetupEntry.limitToList, Boolean.TRUE);
- setupControl(TestSetupEntry.reRender, STATUS_ID + "," + TIME_ID);
- clickLoad();
+ List<String> htmlBefore = new ArrayList<String>();
+ List<String> htmlAfter = new ArrayList<String>();
-
- String text = base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID);
-
- checkComponentReRendered();
-
- base.AssertTextNotEquals(base.getParentId() + AUTOTEST_FORM_ID + TIME_ID, text, "" +
- "LimitToList = true does not work. Component in reRender list was not rerendered");
-
- }
-
-
- public void testRequestParameters(Map<String, String> params) {
- reset();
- clickLoad();
-
- base.sendAjax();
-
- for (String name : params.keySet()) {
- String value = base.runScript(PARAMS_MAP_VAR_NAME + "." + name);
- if (value == null) {
- Assert.fail("Parameter [" + name + "] is not present in ajax request");
- }else if (!value.equals(params.get(name))) {
- Assert.fail("Parameter [" + name + "] value is invalid. Expected ["+params.get(name)+"]. But was ["+value+"]");
- }
- }
- }
-
- public void testNestedActionListener() {
- reset();
- clickLoad();
-
- base.sendAjax();
-
- checkNestedActionListener(true);
- }
-
- public void testOncomplete() {
- reset();
- clickLoad();
-
- base.sendAjax();
-
- String oncomplete = base.runScript("window._ajaxOncomplete");
- Assert.assertEquals("true", oncomplete, "Oncomplete attribute does not work.");
-
- }
-
- public void testStyleAndClasses(String [] classNames, Map<String, String> styleAttr) {
- reset();
- clickLoad();
-
- String componentId = getClientId(COMPONENT_ID);
-
- base.assertClassNames(componentId, classNames, "Component's rendering invalid", true);
- base.assertStyleAttributes(componentId, styleAttr);
- }
-
- public void testHTMLEvents() {
- String componentId = getClientId(COMPONENT_ID);
- base.assertEvents(componentId, SeleniumEvent.STANDARD_HTML_EVENTS);
- }
-
- private void checkComponentReRendered() {
- if (base.getReRendersId() == null) {
- return;
- }
-
- List<String> htmlBefore = new ArrayList<String>();
- List<String> htmlAfter = new ArrayList<String>();
-
- for (String id : base.getReRendersId()) {
- htmlBefore.add(base.getHTMLById(getClientId(id)));
- }
+ for (String id : base.getReRendersId()) {
+ htmlBefore.add(base.getHTMLById(getClientId(id)));
+ }
- base.sendAjax();
+ base.sendAjax();
- for (String id : base.getReRendersId()) {
- htmlAfter.add(base.getHTMLById(getClientId(id)));
- }
+ for (String id : base.getReRendersId()) {
+ htmlAfter.add(base.getHTMLById(getClientId(id)));
+ }
- int i = 0;
- for (String html : htmlBefore) {
- Assert
- .assertEquals(
- html,
- htmlAfter.get(i),
- "LimitToList does not work. Component should not be reRendered if limitToList=true");
+ int i = 0;
+ for (String html : htmlBefore) {
+ Assert.assertEquals(html, htmlAfter.get(i),
+ "LimitToList does not work. Component should not be reRendered if limitToList=true");
- i++;
- }
- }
-
- public String getClientId(String id) {
- return (base.getParentId()!= null ? base.getParentId() : "")+ AUTOTEST_FORM_ID + id;
- }
-
- public String getClientId(String id, Template template) {
- return template.getPrefix() + AUTOTEST_FORM_ID + id;
- }
-
-
- private void reset() {
- if (base.getParentId() == null) {
- Assert.fail("Page has not been rendered before test. Invoke 'renderPage' method before !");
- }
+ i++;
+ }
+ }
- for (TestSetupEntry attr : TestSetupEntry.list) {
- setupControl(attr, attr.defaultValue);
- }
- }
-
- private void clickLoad() {
- String commandButtonId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + "_auto_load";
- base.clickCommandAndWait(commandButtonId);
- }
-
- private void setExtrenalValidationFailed() {
- base.setValueById(base.getParentId() + AUTOTEST_FORM_ID + INPUT_ID, "");
- }
+ public String getClientId(String id) {
+ return (base.getParentId() != null ? base.getParentId() : "") + AUTOTEST_FORM_ID + id;
+ }
- private void setInternalValidationFailed() {
- base.setInternalValidationFailed();
- }
+ public String getClientId(String id, Template template) {
+ return template.getPrefix() + AUTOTEST_FORM_ID + id;
+ }
- private void setupControl(TestSetupEntry attr, Object o) {
- final String idPrefix = "_auto_";
- String controlId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + idPrefix + attr.name;
- if (attr.type.equals(String.class)) {
- base.runScript("document.getElementById('" + controlId + "').value = '" + o.toString() + "'");
- }else if (attr.type.equals(Boolean.class)) {
- base.runScript("document.getElementById('" + controlId + "').checked = " + o.toString());
- }
- }
-
-
- private void checkActionListener(boolean passed) {
- String status = getStatus();
- if (passed && status != null && status.indexOf(AutoTestBean.ACTION_LISTENER_STATUS) == -1) {
- Assert.fail("ActionListener has been skipped");
- }else if (!passed && status != null && status.indexOf(AutoTestBean.ACTION_LISTENER_STATUS) != -1) {
- Assert.fail(status);
- }
- }
-
- private void checkNestedActionListener(boolean passed) {
- String status = getStatus();
- if (passed && status != null && status.indexOf(AutoTestBean.NESTED_ACTION_LISTENER_STATUS) == -1) {
- Assert.fail("Nested actionListener has been skipped");
- }else if (!passed && status != null && status.indexOf(AutoTestBean.NESTED_ACTION_LISTENER_STATUS) != -1) {
- Assert.fail("Nested actionListener should be skipped");
- }
- }
-
- private void checkUpdateModel(boolean passed) {
- String status = getStatus();
- if (passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) == -1) {
- Assert.fail("Update Model phase has been skipped");
- }else if (!passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) != -1) {
- Assert.fail("Update Model phase should be skipped");
- }
- }
-
- private String getStatus() {
- return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
- }
-}
+ private void reset() {
+ if (base.getParentId() == null) {
+ Assert.fail("Page has not been rendered before test. Invoke 'renderPage' method before !");
+ }
+ for (TestSetupEntry attr : TestSetupEntry.list) {
+ setupControl(attr, attr.defaultValue);
+ }
+ }
+ private void clickLoad() {
+ String commandButtonId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + "_auto_load";
+ base.clickCommandAndWait(commandButtonId);
+ }
+ private void setExtrenalValidationFailed() {
+ base.setValueById(base.getParentId() + AUTOTEST_FORM_ID + INPUT_ID, "");
+ }
+
+ private void setInternalValidationFailed() {
+ base.setInternalValidationFailed();
+ }
+
+ private void setupControl(TestSetupEntry attr, Object o) {
+ final String idPrefix = "_auto_";
+ String controlId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + idPrefix + attr.name;
+ if (attr.type.equals(String.class)) {
+ base.runScript("document.getElementById('" + controlId + "').value = '" + o.toString() + "'");
+ } else if (attr.type.equals(Boolean.class)) {
+ base.runScript("document.getElementById('" + controlId + "').checked = " + o.toString());
+ }
+ }
+
+ private void checkActionListener(boolean passed) {
+ String status = getStatus();
+ if (passed && status != null && status.indexOf(AutoTestBean.ACTION_LISTENER_STATUS) == -1) {
+ Assert.fail("ActionListener has been skipped");
+ } else if (!passed && status != null && status.indexOf(AutoTestBean.ACTION_LISTENER_STATUS) != -1) {
+ Assert.fail(status);
+ }
+ }
+
+ private void checkNestedActionListener(boolean passed) {
+ String status = getStatus();
+ if (passed && status != null && status.indexOf(AutoTestBean.NESTED_ACTION_LISTENER_STATUS) == -1) {
+ Assert.fail("Nested actionListener has been skipped");
+ } else if (!passed && status != null && status.indexOf(AutoTestBean.NESTED_ACTION_LISTENER_STATUS) != -1) {
+ Assert.fail("Nested actionListener should be skipped");
+ }
+ }
+
+ private void checkUpdateModel(boolean passed) {
+ String status = getStatus();
+ if (passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) == -1) {
+ Assert.fail("Update Model phase has been skipped");
+ } else if (!passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) != -1) {
+ Assert.fail("Update Model phase should be skipped");
+ }
+ }
+
+ private String getStatus() {
+ return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
+ }
+}
+
class TestSetupEntry {
-
- String name;
-
- Class<?> type;
-
- Object defaultValue;
- public TestSetupEntry(String name, Class<?> type, Object defaultValue) {
- super();
- this.name = name;
- this.type = type;
- this.defaultValue = defaultValue;
- }
-
+ String name;
- public static final TestSetupEntry reRender = new TestSetupEntry("reRender", String.class, AutoTester.STATUS_ID);
- public static final TestSetupEntry validatorId = new TestSetupEntry("validatorId", String.class, AutoTestBean.VALIDATOR_DEFAULT_ID);
- public static final TestSetupEntry oncomplete = new TestSetupEntry("oncomplete", String.class, AutoTestBean.ONCOMPLETE);
- public static final TestSetupEntry rendered = new TestSetupEntry("rendered", Boolean.class, Boolean.TRUE);
- public static final TestSetupEntry ajaxSingle = new TestSetupEntry("ajaxSingle", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry immediate = new TestSetupEntry("immediate", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
-
- public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
- static {
- list.add(reRender);
- list.add(validatorId);
- list.add(rendered);
- list.add(ajaxSingle);
- list.add(immediate);
- list.add(bypassUpdate);
- list.add(limitToList);
- list.add(oncomplete);
-
- }
+ Class<?> type;
+ Object defaultValue;
+
+ public TestSetupEntry(String name, Class<?> type, Object defaultValue) {
+ super();
+ this.name = name;
+ this.type = type;
+ this.defaultValue = defaultValue;
+ }
+
+ public static final TestSetupEntry reRender = new TestSetupEntry("reRender", String.class, AutoTester.STATUS_ID);
+
+ public static final TestSetupEntry validatorId = new TestSetupEntry("validatorId", String.class,
+ AutoTestBean.VALIDATOR_DEFAULT_ID);
+
+ public static final TestSetupEntry oncomplete = new TestSetupEntry("oncomplete", String.class,
+ AutoTestBean.ONCOMPLETE);
+
+ public static final TestSetupEntry rendered = new TestSetupEntry("rendered", Boolean.class, Boolean.TRUE);
+
+ public static final TestSetupEntry ajaxSingle = new TestSetupEntry("ajaxSingle", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry immediate = new TestSetupEntry("immediate", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
+
+ public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
+ static {
+ list.add(reRender);
+ list.add(validatorId);
+ list.add(rendered);
+ list.add(ajaxSingle);
+ list.add(immediate);
+ list.add(bypassUpdate);
+ list.add(limitToList);
+ list.add(oncomplete);
+
+ }
+
}
17 years, 2 months
JBoss Rich Faces SVN: r10818 - in trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-10-17 06:22:55 -0400 (Fri, 17 Oct 2008)
New Revision: 10818
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
Log:
SimpleTogglePanel: immediate tests
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-16 22:41:34 UTC (rev 10817)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-17 10:22:55 UTC (rev 10818)
@@ -134,14 +134,27 @@
reset();
setupControl(TestSetupEntry.immediate, Boolean.TRUE);
clickLoad();
-
+
base.sendAjax();
-
+
checkActionListener(true);
checkUpdateModel(false);
}
-
+
+ public void testImmediateWithExternalValidationFailed() {
+ reset();
+ setupControl(TestSetupEntry.immediate, Boolean.TRUE);
+ clickLoad();
+
+ setExtrenalValidationFailed();
+ base.sendAjax();
+
+ checkActionListener(true);
+ checkUpdateModel(false);
+
+ }
+
public void testBypassUpdate() {
reset();
setupControl(TestSetupEntry.bypassUpdate, Boolean.TRUE);
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-10-16 22:41:34 UTC (rev 10817)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-10-17 10:22:55 UTC (rev 10818)
@@ -163,6 +163,22 @@
tester.testAjaxSingleWithInternalValidationFailed();
}
+ @Test
+ public void testImmediate(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test immediate attribute");
+ tester.testImmediate();
+ }
+
+ @Test
+ public void testImmediateWithExternalValidationFailed(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test immediate attribute with external validation failed");
+ tester.testImmediateWithExternalValidationFailed();
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID) + "_header");
17 years, 2 months
JBoss Rich Faces SVN: r10817 - trunk/cdk/maven-archetype-seam-app.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-16 18:41:34 -0400 (Thu, 16 Oct 2008)
New Revision: 10817
Modified:
trunk/cdk/maven-archetype-seam-app/
Log:
target svn:ignored
Property changes on: trunk/cdk/maven-archetype-seam-app
___________________________________________________________________
Name: svn:ignore
+ target
17 years, 2 months
JBoss Rich Faces SVN: r10816 - trunk/framework/impl/src/main/java/org/ajax4jsf/util.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-16 18:39:43 -0400 (Thu, 16 Oct 2008)
New Revision: 10816
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/util/GifEncoder.java
Log:
https://jira.jboss.org/jira/browse/RF-4578
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/GifEncoder.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/GifEncoder.java 2008-10-16 22:33:01 UTC (rev 10815)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/GifEncoder.java 2008-10-16 22:39:43 UTC (rev 10816)
@@ -1,24 +1,3 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
package org.ajax4jsf.util;
import java.awt.Image;
17 years, 2 months