JBoss Rich Faces SVN: r23142 - in modules/tests/metamer/branches/wfk2-product-branch: application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2012-01-13 04:40:56 -0500 (Fri, 13 Jan 2012)
New Revision: 23142
Modified:
modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/pom.xml
Log:
RichFaces upgraded to 4.1.0.Final-redhat-1
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2012-01-13 01:08:50 UTC (rev 23141)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2012-01-13 09:40:56 UTC (rev 23142)
@@ -20,7 +20,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.1.0.CR2-redhat-1</version>
+ <version>4.1.0.Final-redhat-1</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml 2012-01-13 01:08:50 UTC (rev 23141)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest/pom.xml 2012-01-13 09:40:56 UTC (rev 23142)
@@ -31,7 +31,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-ftest</artifactId>
- <version>4.1.0.CR2-redhat-1</version>
+ <version>4.1.0.Final-redhat-1</version>
<name>Metamer: RichFaces Testing Application - Functional Test</name>
<packaging>pom</packaging>
@@ -81,8 +81,8 @@
<properties>
<context.path>/metamer/</context.path>
<deployable.classifier>mojarra</deployable.classifier>
- <deployable.version>4.1.0.CR2-redhat-1</deployable.version>
- <ftest.source.version>4.1.0.CR2-redhat-1</ftest.source.version>
+ <deployable.version>4.1.0.Final-redhat-1</deployable.version>
+ <ftest.source.version>4.1.0.Final-redhat-1</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
<jsf.config>Mojarra-2.0</jsf.config>
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml 2012-01-13 01:08:50 UTC (rev 23141)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/pom.xml 2012-01-13 09:40:56 UTC (rev 23142)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.1.0.CR2-redhat-1</version>
+ <version>4.1.0.Final-redhat-1</version>
</parent>
<artifactId>metamer-ftest-source</artifactId>
Modified: modules/tests/metamer/branches/wfk2-product-branch/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/pom.xml 2012-01-13 01:08:50 UTC (rev 23141)
+++ modules/tests/metamer/branches/wfk2-product-branch/pom.xml 2012-01-13 09:40:56 UTC (rev 23142)
@@ -25,7 +25,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.1.0.CR2-redhat-1</version>
+ <version>4.1.0.Final-redhat-1</version>
<packaging>pom</packaging>
<name>Metamer: RichFaces Testing Application - Project Root</name>
@@ -118,7 +118,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>3</richfaces.checkstyle.version>
- <version.richfaces>4.1.0.CR2-redhat-1</version.richfaces>
+ <version.richfaces>4.1.0.Final-redhat-1</version.richfaces>
</properties>
<dependencyManagement>
12 years, 11 months
JBoss Rich Faces SVN: r23141 - modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-12 20:08:50 -0500 (Thu, 12 Jan 2012)
New Revision: 23141
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csvOnJsr303.xhtml
Log:
RF-11846: add example to simulate rich:validator with many inputs
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csvOnJsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csvOnJsr303.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csvOnJsr303.xhtml 2012-01-13 01:08:50 UTC (rev 23141)
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+ <style type="text/css">
+ .rf-msg-err {
+ display: block !important;
+ margin-bottom: 6px;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = true;
+ $('input[id$=assertFalse]')[0].checked = false;
+ $('input[id$=decimalMinMax]').val('3');
+ $('input[id$=digits]').val('2.567');
+ $('input[id$=max]').val('9');
+ $('input[id$=min]').val('4');
+ $('input[id$=minMax]').val('4');
+ $('input[id$=notEmpty]').val('RichFaces 4');
+ $('input[id$=notNull]').val('RichFaces 4');
+ $('input[id$=custom]').val('RichFaces');
+ $('input[id$=pattern]').val('richFaces 4');
+ $('input[id$=past]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=future]').val(inFuture.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF');
+ $('input[value=A]')[0].checked=true
+ $('input[value=B]')[0].checked=true
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=false
+ }
+
+ function setWrongValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = false;
+ $('input[id$=assertFalse]')[0].checked = true;
+ $('input[id$=decimalMinMax]').val('10.668');
+ $('input[id$=digits]').val('15.627123');
+ $('input[id$=max]').val('122');
+ $('input[id$=min]').val('-544');
+ $('input[id$=minMax]').val('-5');
+ $('input[id$=notEmpty]').val('');
+ $('input[id$=notNull]').val('');
+ $('input[id$=pattern]').val('@@@');
+ $('input[id$=custom]').val('@@@');
+ $('input[id$=past]').val(inFuture.format("d mmm yyyy"));
+ $('input[id$=future]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=stringSize]').val('JSF 2');
+ $('input[value=A]')[0].checked=false
+ $('input[value=B]')[0].checked=false
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=true
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button" value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button" value="set wrong values" onclick="setWrongValues()"/>
+
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="assertTrue" value="#{assertTrueBean.description}" />
+ <h:selectBooleanCheckbox id="assertTrue" value="#{assertTrueBean.value}" label="#{assertTrueBean.label}" >
+ <rich:validator />
+ </h:selectBooleanCheckbox>
+ <rich:message id="assertTrueMsg" for="assertTrue" />
+
+ <h:outputLabel for="assertFalse" value="#{assertFalseBean.description}" />
+ <h:selectBooleanCheckbox id="assertFalse" value="#{assertFalseBean.value}" label="#{assertFalseBean.label}" >
+ <rich:validator />
+ </h:selectBooleanCheckbox>
+ <rich:message id="assertFalseMsg" for="assertFalse" />
+
+ <h:outputLabel for="decimalMinMax" value="#{decimalMinMaxBean.description}" />
+ <h:inputText id="decimalMinMax" value="#{decimalMinMaxBean.value}" label="#{decimalMinMaxBean.label}"
+ converter="#{decimalMinMaxBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="decimalMinMaxMsg" for="decimalMinMax" />
+
+ <h:outputLabel for="digits" value="#{digitsBean.description}" />
+ <h:inputText id="digits" value="#{digitsBean.value}" label="#{digitsBean.label}" converter="#{digitsBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="digitsMsg" for="digits" />
+
+ <h:outputLabel for="max" value="#{maxBean.description}" />
+ <h:inputText id="max" value="#{maxBean.value}" label="#{maxBean.label}" converter="#{maxBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="maxMsg" for="max" />
+
+ <h:outputLabel for="min" value="#{minBean.description}" />
+ <h:inputText id="min" value="#{minBean.value}" label="#{minBean.label}" converter="#{minBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="minMsg" for="min" />
+
+ <h:outputLabel for="minMax" value="#{minMaxBean.description}" />
+ <h:inputText id="minMax" value="#{minMaxBean.value}" label="#{minMaxBean.label}" converter="#{minMaxBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="minMaxMsg" for="minMax" />
+
+ <h:outputLabel for="notEmpty" value="#{notEmptyBean.description} Xš" />
+ <h:inputText id="notEmpty" value="#{notEmptyBean.value}" label="#{notEmptyBean.label}" >
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="notEmptyMsg" for="notEmpty" />
+
+ <h:outputLabel for="notNull" value="#{notNullBean.description}" />
+ <h:inputText id="notNull" value="#{notNullBean.value}" label="#{notNullBean.label}" converter="emptyStringToNullConverter">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="notNullMsg" for="notNull" />
+
+ <h:outputLabel for="pattern" value="#{patternBean.description}" />
+ <h:inputText id="pattern" value="#{patternBean.value}" label="#{patternBean.label}" converter="#{patternBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="patternMsg" for="pattern" />
+
+ <h:outputLabel for="custom" value="custom validator, RichFaces" />
+ <h:inputText id="custom" value="#{richValidatorBean.stringValue}" label="custom">
+ <f:validator validatorId="org.richfaces.StringRichFacesValidator"/>
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="customMsg" for="custom" />
+
+ <h:outputLabel for="past" value="#{pastBean.description}" />
+ <h:inputText id="past" value="#{pastBean.value}" label="#{pastBean.label}" >
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="pastMsg" for="past" />
+
+ <h:outputLabel for="future" value="#{futureBean.description}" />
+ <h:inputText id="future" value="#{futureBean.value}" label="#{futureBean.label}" >
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="futureMsg" for="future" />
+
+ <h:outputLabel for="stringSize" value="#{stringSizeBean.description}" />
+ <h:inputText id="stringSize" value="#{stringSizeBean.value}" label="#{stringSizeBean.label}" >
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="stringSizeMsg" for="stringSize" />
+
+ <h:outputLabel for="size" value="#{sizeBean.description}" />
+ <h:selectManyCheckbox id="size" value="#{sizeBean.value}" label="#{sizeBean.label}" >
+ <f:selectItem itemValue="A" itemLabel="A"/>
+ <f:selectItem itemValue="B" itemLabel="B"/>
+ <f:selectItem itemValue="C" itemLabel="C"/>
+ <f:selectItem itemValue="D" itemLabel="D"/>
+ <f:selectItem itemValue="E" itemLabel="E"/>
+ <f:selectItem itemValue="F" itemLabel="F"/>
+ <rich:validator />
+ </h:selectManyCheckbox>
+ <rich:message id="sizeMsg" for="size" />
+ </h:panelGrid>
+
+ <br/>
+
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages id="msgs"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
12 years, 11 months
JBoss Rich Faces SVN: r23140 - in modules/tests/metamer/trunk/application/src/main/webapp/components: richCollapsibleSubTable and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2012-01-12 05:48:46 -0500 (Thu, 12 Jan 2012)
New Revision: 23140
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDragIndicator/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/cc.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
Log:
unnecessary componentId definition removed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,7 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
<ui:define name="view">
<f:metadata>
@@ -67,4 +66,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,8 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,8 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -67,4 +65,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,8 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -69,4 +67,4 @@
<ui:define name="outOfTemplateAfter"/>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDragIndicator/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDragIndicator/simple.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDragIndicator/simple.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
- Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -27,8 +27,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richTree" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -169,4 +167,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/cc.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/cc.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/cc.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
- Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -27,8 +27,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richTree" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -149,4 +147,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/simple.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDragSource/simple.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
- Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -27,8 +27,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richTree" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -169,4 +167,4 @@
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDropTarget/simple.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
- Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -27,8 +27,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richTree" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,8 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richList/keepSaved.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -26,8 +26,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richDataTable" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2012-01-12 10:48:46 UTC (rev 23140)
@@ -10,7 +10,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -31,8 +31,6 @@
-->
<ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="rich:tree with DnD" />
-
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
12 years, 11 months
JBoss Rich Faces SVN: r23139 - in modules/tests/metamer/branches/contextMenu/application/src/main: webapp/components/richContextMenu and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2012-01-12 05:01:52 -0500 (Thu, 12 Jan 2012)
New Revision: 23139
Modified:
modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml
Log:
context menu sample fixed to work in all templates
Modified: modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java 2012-01-11 13:51:19 UTC (rev 23138)
+++ modules/tests/metamer/branches/contextMenu/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichContextMenuBean.java 2012-01-12 10:01:52 UTC (rev 23139)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat, Inc., and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -50,10 +50,11 @@
public void init() {
log.info("ContextMenu attributes initialized.");
attributes = Attributes.getComponentAttributesFromFacesConfig(UIContextMenu.class, getClass());
- attributes.setAttribute("attachTo", "form:panelClick");
attributes.setAttribute("disabled", "false");
attributes.setAttribute("rendered", "true");
attributes.setAttribute("hideDelay", "600");
+
+ attributes.remove("attachTo");
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml 2012-01-11 13:51:19 UTC (rev 23138)
+++ modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/simple.xhtml 2012-01-12 10:01:52 UTC (rev 23139)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -28,6 +28,8 @@
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="panelClick" />
+
<ui:define name="view">
<f:metadata>
<f:viewParam name="templates" value="#{templateBean.templates}">
@@ -40,8 +42,8 @@
<h:panelGroup layout="block" style="width:500px; background-color: lightgreen; padding: 15px" id="panelClick">
Righ click here for a contextMenu
</h:panelGroup>
- <rich:contextMenu id="ctxmenu"
- attachTo="#{richContextMenuBean.attributes['attachTo'].value}"
+ <rich:contextMenu id="ctxMenu"
+ attachTo="#{nestedComponentId}"
dir="#{richContextMenuBean.attributes['dir'].value}"
direction="#{richContextMenuBean.attributes['direction'].value}"
disabled="#{richContextMenuBean.attributes['disabled'].value}"
12 years, 11 months
JBoss Rich Faces SVN: r23138 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2012-01-11 08:51:19 -0500 (Wed, 11 Jan 2012)
New Revision: 23138
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
Log:
tests marked to be fixed in 4.Future refactored
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessageBean.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -52,7 +52,7 @@
@PostConstruct
public void init() {
logger = LoggerFactory.getLogger(getClass());
- logger.info("initializing bean " + getClass().getName());
+ logger.debug("initializing bean " + getClass().getName());
attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessage.class, getClass());
// setting up incorrect values to fire-up validator
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichMessagesBean.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -58,7 +58,7 @@
@PostConstruct
public void init() {
logger = LoggerFactory.getLogger(getClass());
- logger.info("initializing bean " + getClass().getName());
+ logger.debug("initializing bean " + getClass().getName());
attributes = Attributes.getComponentAttributesFromFacesConfig(UIRichMessages.class, getClass());
simpleInput1 = "10";
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -44,6 +44,7 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -318,8 +319,9 @@
testTitle(panel);
}
- @Test(groups = { "4.Future" })
- @IssueTracking("https://issues.jboss.org/browse/RF-11568")
+ @Test
+ @Templates(exclude = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat" })
public void testToggleListener() {
String reqTime = selenium.getText(time);
guardXhr(selenium).click(header);
@@ -332,6 +334,14 @@
phaseInfo.assertListener(PhaseId.INVOKE_APPLICATION, "panel expanded");
}
+ @Test(groups = { "4.Future" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11568")
+ @Templates(value = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat" })
+ public void testToggleListenerInIterationComponents() {
+ testToggleListener();
+ }
+
private void verifyBeforeClick() {
boolean displayed = selenium.isDisplayed(panel);
assertTrue(displayed, "Collapsible panel is not present on the page.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesCSV.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -27,6 +27,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -58,9 +59,18 @@
}
// list of called test methods
+ @Test
+ @Templates(exclude = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testFor() {
+ super.testFor();
+ }
+
@Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
- public void testFor() {
+ @Templates(value = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testForInIterationComponents() {
super.testFor();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSFValidator.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -27,6 +27,8 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -58,14 +60,23 @@
}
// list of called test methods
+ @Test
+ @Templates(exclude = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testFor() {
+ super.testFor();
+ }
+
@Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
- public void testFor() {
+ @Templates(value = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testForInIterationComponents() {
super.testFor();
}
- @Test(groups = { "4.Future" })
- @IssueTracking("https://issues.jboss.org/browse/RF-11415")
+ @Test
+ @RegressionTest("https://issues.jboss.org/browse/RF-11415")
public void testGlobalOnly() {
super.testGlobalOnly();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMessages/TestRichMessagesJSR303.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -27,6 +27,8 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
@@ -58,14 +60,23 @@
}
// list of called test methods
+ @Test
+ @Templates(exclude = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testFor() {
+ super.testFor();
+ }
+
@Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11298")
- public void testFor() {
+ @Templates(value = { "richDataTable", "richCollapsibleSubTable", "richExtendedDataTable", "richDataGrid",
+ "richList", "a4jRepeat", "hDataTable", "uiRepeat" })
+ public void testForInIterationComponents() {
super.testFor();
}
- @Test(groups = { "4.Future" })
- @IssueTracking("https://issues.jboss.org/browse/RF-11415")
+ @Test
+ @RegressionTest("https://issues.jboss.org/browse/RF-11415")
public void testGlobalOnly() {
super.testGlobalOnly();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2012-01-10 10:57:10 UTC (rev 23137)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2012-01-11 13:51:19 UTC (rev 23138)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -41,6 +41,7 @@
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
public class TestPanelMenuGroupClientSideHandlers extends AbstractPanelMenuGroupTest {
@@ -90,12 +91,21 @@
super.testRequestEventsAfter(event);
}
+ @Test
+ @Use(field = "event", strings = { "beforeselect", "beforeswitch", "begin", "beforedomupdate", "select", "switch",
+ "complete" })
+ @Templates(value = { "a4jRepeat", "richCollapsibleSubTable", "richDataGrid", "richDataTable",
+ "richExtendedDataTable", "richList" })
+ public void testClientSideExpansionEventInIterationComponents() {
+ testClientSideExpansionEvent();
+ }
+
@Test(groups = "4.Future")
@IssueTracking("https://issues.jboss.org/browse/RF-11547")
- @Use(field = "event", value = "ajaxExpansionEvents")
+ @Use(field = "event", strings = { "beforeexpand", "expand" })
@Templates(value = { "a4jRepeat", "richCollapsibleSubTable", "richDataGrid", "richDataTable",
"richExtendedDataTable", "richList" })
- public void testClientSideExpansionEventInIterationComponents() {
+ public void testClientSideExpansionEventInIterationComponentsExpand() {
testClientSideExpansionEvent();
}
12 years, 11 months
JBoss Rich Faces SVN: r23137 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey.
by richfaces-svn-commits@lists.jboss.org
Author: jpapouse
Date: 2012-01-10 05:57:10 -0500 (Tue, 10 Jan 2012)
New Revision: 23137
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java
Log:
test for @preventDefault attribute (rich:hotKey)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java 2012-01-10 10:16:49 UTC (rev 23136)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java 2012-01-10 10:57:10 UTC (rev 23137)
@@ -32,6 +32,7 @@
key,
onkeydown,
onkeyup,
+ preventDefault,
rendered,
selector
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java 2012-01-10 10:16:49 UTC (rev 23136)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java 2012-01-10 10:57:10 UTC (rev 23137)
@@ -26,6 +26,7 @@
import java.awt.event.KeyEvent;
import java.util.List;
+import org.jboss.test.selenium.encapsulated.FrameLocator;
import org.testng.annotations.Test;
@@ -58,8 +59,25 @@
assertEquals(events.get(0), "hotkey 1 : onkeydown");
assertEquals(events.get(1), "hotkey 1 : onkeyup");
}
+
+ @Test
+ public void testPreventDefaultFalse() {
+ ATTRIBUTES_FIRST.set(HotKeyAttributes.preventDefault, false);
+ try {
+ testKeyForPreventDefault(KeyEvent.VK_CONTROL, KeyEvent.VK_F, "ctrl+f", 1);
+ } finally {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_ESCAPE));
+ }
+ }
@Test
+ public void testPreventDefaultTrue() {
+ testKeyForPreventDefault(KeyEvent.VK_CONTROL, KeyEvent.VK_F, "ctrl+f", 2);
+ testKeyForPreventDefault(KeyEvent.VK_CONTROL, KeyEvent.VK_H, "ctrl+h", 2);
+ testKeyForPreventDefault(KeyEvent.VK_CONTROL, KeyEvent.VK_U, "ctrl+u", 2);
+ }
+
+ @Test
public void testRendered() {
ATTRIBUTES_FIRST.set(HotKeyAttributes.rendered, false);
ATTRIBUTES_FIRST.set(HotKeyAttributes.key, "x");
@@ -81,4 +99,14 @@
checkEvent("hotkey 1", 2);
}
+ private void testKeyForPreventDefault(int firstKey, int secondKey, String keyString, int expectedNum) {
+ clearHotKeyEvents();
+ ATTRIBUTES_FIRST.set(HotKeyAttributes.key, keyString);
+ selenium.keyDownNative(String.valueOf(firstKey));
+ selenium.keyPressNative(String.valueOf(secondKey));
+ selenium.keyPressNative(String.valueOf(secondKey));
+ selenium.keyUpNative(String.valueOf(firstKey));
+ checkEvent("onkeydown", expectedNum);
+ }
+
}
12 years, 11 months
JBoss Rich Faces SVN: r23136 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey.
by richfaces-svn-commits@lists.jboss.org
Author: jpapouse
Date: 2012-01-10 05:16:49 -0500 (Tue, 10 Jan 2012)
New Revision: 23136
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/AbstractRichHotKeyTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKey.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java
Log:
fixed tests for rich:hotKey
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/AbstractRichHotKeyTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/AbstractRichHotKeyTest.java 2012-01-10 09:38:24 UTC (rev 23135)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/AbstractRichHotKeyTest.java 2012-01-10 10:16:49 UTC (rev 23136)
@@ -24,6 +24,8 @@
import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.URLUtils;
@@ -46,7 +48,8 @@
protected static final JQueryLocator INPUT_2 = pjq(INPUT_2_LOCATOR);
private static final JQueryLocator CLEAR_BUTTON = pjq("button.rf-log-element");
- private static final String HOT_KEY_EVENT_LOCATOR = "span.rf-log-entry-msg-info:contains({0})";
+ private static final String HOT_KEY_EVENT_LOCATOR_WITH_CONTENT = "span.rf-log-entry-msg-info:contains({0})";
+ private static final String HOT_KEY_EVENT_LOCATOR_WITH_ORDER = "span.rf-log-entry-msg-info:eq({0})";
@Override
public URL getTestUrl() {
@@ -55,15 +58,24 @@
protected void checkEvent(String text, int number) {
waitGui
- .failWith("The number of hotkey events doesn't match. Found <" + selenium.getCount(pjq(format(HOT_KEY_EVENT_LOCATOR, text))) + ">, expected <" + number + ">.")
- .until(countEquals.locator(pjq(format(HOT_KEY_EVENT_LOCATOR, text))).count(number));
+ .failWith("The number of hotkey events doesn't match. Found <" + selenium.getCount(pjq(format(HOT_KEY_EVENT_LOCATOR_WITH_CONTENT, text))) + ">, expected <" + number + ">.")
+ .until(countEquals.locator(pjq(format(HOT_KEY_EVENT_LOCATOR_WITH_CONTENT, text))).count(number));
}
protected void clearHotKeyEvents() {
selenium.click(CLEAR_BUTTON);
- waitGui.until(NegationCondition.getInstance().condition(elementPresent.locator(pjq(format(HOT_KEY_EVENT_LOCATOR, "''")))));
+ waitGui.until(NegationCondition.getInstance().condition(elementPresent.locator(pjq(format(HOT_KEY_EVENT_LOCATOR_WITH_CONTENT, "''")))));
}
+ protected List<String> getEvents() {
+ List<String> events = new ArrayList<String>();
+ int eventsCount = selenium.getCount(pjq(format(HOT_KEY_EVENT_LOCATOR_WITH_CONTENT, "''")));
+ for (int i=0; i<eventsCount; i++) {
+ events.add(selenium.getText(pjq(format(HOT_KEY_EVENT_LOCATOR_WITH_ORDER, String.valueOf(i)))));
+ }
+ return events;
+ }
+
protected static final Attributes<HotKeyAttributes> ATTRIBUTES_FIRST = new Attributes<HotKeyAttributes>(pjq("table.attributes[id$=attributes1]"));
protected static final Attributes<HotKeyAttributes> ATTRIBUTES_SECOND = new Attributes<HotKeyAttributes>(pjq("table.attributes[id$=attributes2]"));
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java 2012-01-10 09:38:24 UTC (rev 23135)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/HotKeyAttributes.java 2012-01-10 10:16:49 UTC (rev 23136)
@@ -30,8 +30,9 @@
enabledInInput,
key,
+ onkeydown,
+ onkeyup,
rendered,
- selector,
- type
+ selector
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKey.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKey.java 2012-01-10 09:38:24 UTC (rev 23135)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKey.java 2012-01-10 10:16:49 UTC (rev 23136)
@@ -21,12 +21,8 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richHotKey;
-import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
-
import java.awt.event.KeyEvent;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.jboss.test.selenium.waiting.NegationCondition;
import org.testng.annotations.Test;
/**
@@ -51,9 +47,9 @@
selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
selenium.keyUpNative(String.valueOf(KeyEvent.VK_ALT));
}
- checkEvent("hotkey 1", i);
- checkEvent("hotkey 2", i);
- checkEvent("''", 2 * i);
+ checkEvent("hotkey 1 : onkeydown", i);
+ checkEvent("hotkey 2 : onkeydown", i);
+ checkEvent("'onkeydown'", 2 * i);
clearHotKeyEvents();
}
}
@@ -66,24 +62,22 @@
selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
selenium.keyPressNative(String.valueOf(KeyEvent.VK_A));
}
- checkEvent("hotkey 1", i);
- checkEvent("''", i);
+ checkEvent("hotkey 1 : onkeydown", i);
+ checkEvent("onkeydown", i);
clearHotKeyEvents();
}
}
@Test
public void testFirstPair() {
- testPair(KeyEvent.VK_CONTROL, KeyEvent.VK_X, "hotkey 1");
+ testPair(KeyEvent.VK_CONTROL, KeyEvent.VK_X, "hotkey 1 : onkeydown");
}
@Test
public void testSecondPair() {
- testPair(KeyEvent.VK_ALT, KeyEvent.VK_X, "hotkey 2");
+ testPair(KeyEvent.VK_ALT, KeyEvent.VK_X, "hotkey 2 : onkeydown");
}
-
-
private void testPair(int firstKey, int secondKey, String text) {
for (int i=1; i<=NUMBER_OF_TESTS; i++) {
for (int j=0; j<i; j++) {
@@ -94,7 +88,7 @@
selenium.keyUpNative(String.valueOf(firstKey));
}
checkEvent(text, i);
- checkEvent("''", i);
+ checkEvent("onkeydown", i);
clearHotKeyEvents();
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java 2012-01-10 09:38:24 UTC (rev 23135)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richHotKey/TestRichHotKeyAttributes.java 2012-01-10 10:16:49 UTC (rev 23136)
@@ -21,9 +21,11 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richHotKey;
+import static org.testng.Assert.assertEquals;
+
import java.awt.event.KeyEvent;
+import java.util.List;
-import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
@@ -32,21 +34,13 @@
*/
public class TestRichHotKeyAttributes extends AbstractRichHotKeyTest {
- @AfterMethod
- public void tearDown() {
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_CONTROL));
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_ALT));
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_M));
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_X));
- }
-
@Test
public void enabledInInput() {
ATTRIBUTES_FIRST.set(HotKeyAttributes.key, "x");
// true
selenium.focus(INPUT_1);
selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
- checkEvent("hotkey 1", 1);
+ checkEvent("hotkey 1", 2);
clearHotKeyEvents();
// false
ATTRIBUTES_FIRST.set(HotKeyAttributes.enabledInInput, false);
@@ -54,6 +48,16 @@
selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
checkEvent("hotkey 1", 0);
}
+
+ @Test
+ public void testOnkeydownAndOnkeyup() {
+ ATTRIBUTES_FIRST.set(HotKeyAttributes.key, "x");
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
+ checkEvent("hotkey 1", 2);
+ List<String> events = getEvents();
+ assertEquals(events.get(0), "hotkey 1 : onkeydown");
+ assertEquals(events.get(1), "hotkey 1 : onkeyup");
+ }
@Test
public void testRendered() {
@@ -74,71 +78,7 @@
checkEvent("hotkey 1", 0);
selenium.focus(INPUT_1);
selenium.keyPressNative(String.valueOf(KeyEvent.VK_X));
- checkEvent("hotkey 1", 1);
+ checkEvent("hotkey 1", 2);
}
- @Test
- public void testTypeKeydownOne() {
- testTypeOne("keydown", 3, KeyEvent.VK_CONTROL, "ctrl");
- }
-
- @Test
- public void testTypeKeydownPair() {
- testTypePair("keydown", 3, KeyEvent.VK_ALT, KeyEvent.VK_CONTROL, "alt+ctrl");
- }
-
- @Test
- public void testTypeKeypressOne() {
- testTypeOne("keypress", 0, KeyEvent.VK_CONTROL, "ctrl");
- tearDown();
- testTypeOne("keypress", 3, KeyEvent.VK_X, "x");
- }
-
- @Test
- public void testTypeKeypressPair() {
- testTypePair("keypress", 3, KeyEvent.VK_CONTROL, KeyEvent.VK_X, "ctrl+x");
- }
-
- @Test
- public void testTypeKeyupOne() {
- testTypeOne("keyup", 2, KeyEvent.VK_CONTROL, "ctrl");
- }
-
- @Test
- public void testTypeKeyupPair() {
- testTypePair("keyup", 2, KeyEvent.VK_ALT, KeyEvent.VK_CONTROL, "alt+ctrl");
- }
-
- private void processOneKeySequence(int correctKey, int wrongKey) {
- selenium.keyDownNative(String.valueOf(correctKey));
- selenium.keyDownNative(String.valueOf(wrongKey));
- selenium.keyUpNative(String.valueOf(correctKey));
- selenium.keyUpNative(String.valueOf(wrongKey));
- selenium.keyPressNative(String.valueOf(correctKey));
- selenium.keyPressNative(String.valueOf(wrongKey));
- selenium.keyDownNative(String.valueOf(correctKey));
- selenium.keyDownNative(String.valueOf(wrongKey));
- }
-
- private void processPairKeySequence(int firstKey, int secondCorrectKey, int secondWrongKey) {
- selenium.keyDownNative(String.valueOf(firstKey));
- processOneKeySequence(secondCorrectKey, secondWrongKey);
- }
-
- private void testTypeOne(String event, int number, int correctKeyCode, String correctKeyName) {
- ATTRIBUTES_FIRST.set(HotKeyAttributes.key, correctKeyName);
- ATTRIBUTES_FIRST.set(HotKeyAttributes.type, event);
- processOneKeySequence(correctKeyCode, KeyEvent.VK_M);
- checkEvent("hotkey 1", number);
- clearHotKeyEvents();
- }
-
- private void testTypePair(String event, int number, int firstCorrectKeyCode, int secondCorrectKeyCode, String keyNames) {
- ATTRIBUTES_FIRST.set(HotKeyAttributes.key, keyNames);
- ATTRIBUTES_FIRST.set(HotKeyAttributes.type, event);
- processPairKeySequence(firstCorrectKeyCode, secondCorrectKeyCode, KeyEvent.VK_M);
- checkEvent("hotkey 1", number);
- clearHotKeyEvents();
- }
-
}
12 years, 11 months
JBoss Rich Faces SVN: r23135 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richHotKey and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: jpapouse
Date: 2012-01-10 04:38:24 -0500 (Tue, 10 Jan 2012)
New Revision: 23135
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHotKeyBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/orderingList.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/pickList.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/simple.xhtml
Log:
fixed samples for rich:hotKey component
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHotKeyBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHotKeyBean.java 2012-01-09 14:55:52 UTC (rev 23134)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichHotKeyBean.java 2012-01-10 09:38:24 UTC (rev 23135)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -22,6 +22,8 @@
package org.richfaces.tests.metamer.bean.rich;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
@@ -36,6 +38,7 @@
* Managed bean for rich:hotKey.
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @author <a href="mailto:jpapouse@redhat.com">Jan Papousek</a>
* @version $Revision$
*/
@ManagedBean(name = "richHotKeyBean")
@@ -46,6 +49,7 @@
private static Logger logger;
private Attributes attributes;
private Attributes attributes2;
+ private Collection<String> hiddenAttributes = new ArrayList<String>();
/**
* Initializes the managed bean.
@@ -58,15 +62,23 @@
attributes = Attributes.getComponentAttributesFromFacesConfig(UIHotKey.class, getClass());
attributes2 = Attributes.getComponentAttributesFromFacesConfig(UIHotKey.class, getClass());
+ String[] attrsToHide = { "onkeydown", "onkeyup" };
+
attributes.setAttribute("enabledInInput", true);
attributes.setAttribute("key", "ctrl+x");
attributes.setAttribute("rendered", true);
- attributes.remove("onpress");
+ attributes.setAttribute("preventDefault", true);
attributes2.setAttribute("enabledInInput", true);
attributes2.setAttribute("key", "alt+x");
attributes2.setAttribute("rendered", true);
- attributes2.remove("onpress");
+ attributes2.setAttribute("preventDefault", true);
+
+ for (String attrToHide : attrsToHide) {
+ attributes.remove(attrToHide);
+ attributes2.remove(attrToHide);
+ hiddenAttributes.add(attrToHide);
+ }
}
public Attributes getAttributes() {
@@ -84,4 +96,12 @@
public void setAttributes2(Attributes attributes) {
this.attributes2 = attributes;
}
+
+ public Collection<String> getHiddenAttributes() {
+ return hiddenAttributes;
+ }
+
+ public void setHiddenAttributes(Collection<String> hiddenAttributes) {
+ this.hiddenAttributes = hiddenAttributes;
+ }
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/editor.xhtml 2012-01-10 09:38:24 UTC (rev 23135)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -40,15 +40,21 @@
<rich:editor id="editor" />
- <rich:hotKey id="richHotKey1" enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes['key'].value}" onpress="#{rich:component('editor')}.focus()"
- rendered="#{richHotKeyBean.attributes['rendered'].value}" selector="#{richHotKeyBean.attributes['selector'].value}"
- type="#{richHotKeyBean.attributes['type'].value}" />
+ <rich:hotKey id="richHotKey1"
+ enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes['key'].value}"
+ onkeydown="#{rich:component('editor')}.focus()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
+ rendered="#{richHotKeyBean.attributes['rendered'].value}"
+ selector="#{richHotKeyBean.attributes['selector'].value}" />
- <rich:hotKey id="richHotKey2" enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes2['key'].value}" onpress="#{rich:component('editor')}.blur()"
+ <rich:hotKey id="richHotKey2"
+ enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes2['key'].value}"
+ onkeydown="#{rich:component('editor')}.blur()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
rendered="#{richHotKeyBean.attributes2['rendered'].value}"
- selector="#{richHotKeyBean.attributes2['selector'].value}" type="#{richHotKeyBean.attributes2['type'].value}" />
+ selector="#{richHotKeyBean.attributes2['selector'].value}" />
</ui:define>
@@ -64,6 +70,13 @@
<legend>Hot key that calls editor's blur() function</legend>
<metamer:attributes value="#{richHotKeyBean.attributes2}" id="attributes2" />
</fieldset>
+ <hr />
+ <p>
+ Following attributes are hidden:
+ </p>
+ <rich:list id="hiddenAttributes" value="#{richHotKeyBean.hiddenAttributes}" var="attribute">
+ <h:outputText value="#{attribute}" />
+ </rich:list>
</ui:define>
</ui:composition>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/orderingList.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/orderingList.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/orderingList.xhtml 2012-01-10 09:38:24 UTC (rev 23135)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -55,15 +55,21 @@
</rich:orderingList>
- <rich:hotKey id="richHotKey1" enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes['key'].value}" onpress="#{rich:component('orderingList')}.upTop()"
- rendered="#{richHotKeyBean.attributes['rendered'].value}" selector="#{richHotKeyBean.attributes['selector'].value}"
- type="#{richHotKeyBean.attributes['type'].value}" />
+ <rich:hotKey id="richHotKey1"
+ enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes['key'].value}"
+ onkeydown="#{rich:component('orderingList')}.upTop()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
+ rendered="#{richHotKeyBean.attributes['rendered'].value}"
+ selector="#{richHotKeyBean.attributes['selector'].value}" />
- <rich:hotKey id="richHotKey2" enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes2['key'].value}" onpress="#{rich:component('orderingList')}.downBottom()"
+ <rich:hotKey id="richHotKey2"
+ enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes2['key'].value}"
+ onkeydown="#{rich:component('orderingList')}.downBottom()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
rendered="#{richHotKeyBean.attributes2['rendered'].value}"
- selector="#{richHotKeyBean.attributes2['selector'].value}" type="#{richHotKeyBean.attributes2['type'].value}" />
+ selector="#{richHotKeyBean.attributes2['selector'].value}" />
</ui:define>
@@ -79,6 +85,13 @@
<legend>>Hot key that calls ordering list's downBottom() function</legend>
<metamer:attributes value="#{richHotKeyBean.attributes2}" id="attributes2" />
</fieldset>
+ <hr />
+ <p>
+ Following attributes are hidden:
+ </p>
+ <rich:list id="hiddenAttributes" value="#{richHotKeyBean.hiddenAttributes}" var="attribute">
+ <h:outputText value="#{attribute}" />
+ </rich:list>
</ui:define>
<!-- we don't want two logs on the page -->
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/pickList.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/pickList.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/pickList.xhtml 2012-01-10 09:38:24 UTC (rev 23135)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
+Copyright 2010-2012, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -62,15 +62,21 @@
</rich:pickList>
- <rich:hotKey id="richHotKey1" enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes['key'].value}" onpress="#{rich:component('pickList')}.add()"
- rendered="#{richHotKeyBean.attributes['rendered'].value}" selector="#{richHotKeyBean.attributes['selector'].value}"
- type="#{richHotKeyBean.attributes['type'].value}" />
+ <rich:hotKey id="richHotKey1"
+ enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes['key'].value}"
+ onkeydown="#{rich:component('pickList')}.add()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
+ rendered="#{richHotKeyBean.attributes['rendered'].value}"
+ selector="#{richHotKeyBean.attributes['selector'].value}" />
- <rich:hotKey id="richHotKey2" enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes2['key'].value}" onpress="#{rich:component('pickList')}.remove()"
+ <rich:hotKey id="richHotKey2"
+ enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes2['key'].value}"
+ onkeydown="#{rich:component('pickList')}.remove()"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
rendered="#{richHotKeyBean.attributes2['rendered'].value}"
- selector="#{richHotKeyBean.attributes2['selector'].value}" type="#{richHotKeyBean.attributes2['type'].value}" />
+ selector="#{richHotKeyBean.attributes2['selector'].value}"/>
</ui:define>
@@ -86,6 +92,13 @@
<legend>Hot key that calls pick list's remove() function</legend>
<metamer:attributes value="#{richHotKeyBean.attributes2}" id="attributes2" />
</fieldset>
+ <hr />
+ <p>
+ Following attributes are hidden:
+ </p>
+ <rich:list id="hiddenAttributes" value="#{richHotKeyBean.hiddenAttributes}" var="attribute">
+ <h:outputText value="#{attribute}" />
+ </rich:list>
</ui:define>
</ui:composition>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/simple.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richHotKey/simple.xhtml 2012-01-10 09:38:24 UTC (rev 23135)
@@ -45,15 +45,23 @@
<h:inputText id="firstInput" styleClass="first-input" value="first input" />
<h:inputText id="secondInput" styleClass="second-input" value="second input" />
- <rich:hotKey id="richHotKey1" enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes['key'].value}" onpress="RichFaces.log.info('hotkey 1')"
+ <rich:hotKey id="richHotKey1"
+ enabledInInput="#{richHotKeyBean.attributes['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes['key'].value}"
+ onkeydown="RichFaces.log.info('hotkey 1 : onkeydown')"
+ onkeyup="RichFaces.log.info('hotkey 1 : onkeyup')"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
rendered="#{richHotKeyBean.attributes['rendered'].value}"
- selector="#{richHotKeyBean.attributes['selector'].value}" type="#{richHotKeyBean.attributes['type'].value}" />
+ selector="#{richHotKeyBean.attributes['selector'].value}"/>
- <rich:hotKey id="richHotKey2" enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
- key="#{richHotKeyBean.attributes2['key'].value}" onpress="RichFaces.log.info('hotkey 2')"
+ <rich:hotKey id="richHotKey2"
+ enabledInInput="#{richHotKeyBean.attributes2['enabledInInput'].value}"
+ key="#{richHotKeyBean.attributes2['key'].value}"
+ onkeydown="RichFaces.log.info('hotkey 2 : onkeydown')"
+ onkeyup="RichFaces.log.info('hotkey 2 : onkeyup')"
+ preventDefault="#{richHotKeyBean.attributes['preventDefault'].value}"
rendered="#{richHotKeyBean.attributes2['rendered'].value}"
- selector="#{richHotKeyBean.attributes2['selector'].value}" type="#{richHotKeyBean.attributes2['type'].value}" />
+ selector="#{richHotKeyBean.attributes2['selector'].value}"/>
</a4j:outputPanel>
@@ -71,6 +79,13 @@
<legend>hot key 2</legend>
<metamer:attributes value="#{richHotKeyBean.attributes2}" id="attributes2" />
</fieldset>
+ <hr />
+ <p>
+ Following attributes are hidden:
+ </p>
+ <rich:list id="hiddenAttributes" value="#{richHotKeyBean.hiddenAttributes}" var="attribute">
+ <h:outputText value="#{attribute}" />
+ </rich:list>
</ui:define>
<!-- we don't want two logs on the page -->
12 years, 11 months
JBoss Rich Faces SVN: r23134 - in modules/tests/metamer/branches/wfk2-product-branch: application and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2012-01-09 09:55:52 -0500 (Mon, 09 Jan 2012)
New Revision: 23134
Added:
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTreeSelection.java
Modified:
modules/tests/metamer/branches/wfk2-product-branch/
modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/formQueue.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/globalQueue.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richEditor/simple.xhtml
modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/header.xhtml
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestDateEditor.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuGroup/TestRichMenuGroup.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
Log:
merged with trunk
Property changes on: modules/tests/metamer/branches/wfk2-product-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /modules/tests/metamer/trunk:22762-22826,22828-22843,22845-23029,23033-23067
+ /modules/tests/metamer/trunk:22762-22826,22828-22843,22845-23029,23033-23067,23070-23133
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/pom.xml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -12,7 +12,8 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -88,8 +89,8 @@
</dependency>
<dependency>
- <groupId>org.jboss.spec.javax.jms</groupId>
- <artifactId>jboss-jms-api_1.1_spec</artifactId>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
@@ -112,6 +113,12 @@
</dependency>
<dependency>
+ <groupId>org.jboss.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.2.5.Final</version>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
@@ -134,15 +141,15 @@
</dependency>
<dependency>
- <groupId>javassist</groupId>
+ <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
- <version>3.12.1.GA</version>
+ <version>3.15.0-GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.0.Final</version>
</dependency>
<!-- JBoss AS7 management -->
@@ -157,10 +164,10 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-controller-client</artifactId>
- <version>7.0.2.Final</version>
+ <version>[7.0.2.Final,)</version>
<scope>provided</scope>
</dependency>
-
+
</dependencies>
<build>
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -145,10 +145,10 @@
public RichFacesTreeNode<Labeled> getRichFacesTreeNodeRoot() {
if (richfacesTreeNodeRoot == null) {
- List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList = (List<RichFacesTreeNode<Labeled>>) (List<?>) buldTree(RichFacesTreeNode.createFactory());
+ List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList = (List<RichFacesTreeNode<Labeled>>) (List<?>) buildTree(RichFacesTreeNode.createFactory());
richfacesTreeNodeRoot = new RichFacesTreeNode<Labeled>();
int i=0;
- for (RichFacesTreeNode node : richfacesTreeNodeList) {
+ for (RichFacesTreeNode<?> node : richfacesTreeNodeList) {
richfacesTreeNodeRoot.addChild(i, node);
i++;
}
@@ -158,8 +158,8 @@
public List<SwingTreeNode<Labeled>> getSwingTreeNodeRoot() {
if (swingTreeNodeRoot == null) {
- List<SwingTreeNode<Labeled>> swingTreeNodelist = (List<SwingTreeNode<Labeled>>) (List<?>) buldTree(SwingTreeNode.createFactory());
- swingTreeNodeRoot = swingTreeNodelist;
+ List<SwingTreeNode<Labeled>> swingTreeNodeList = (List<SwingTreeNode<Labeled>>) (List<?>) buildTree(SwingTreeNode.createFactory());
+ swingTreeNodeRoot = swingTreeNodeList;
}
return swingTreeNodeRoot;
}
@@ -214,7 +214,7 @@
}
}
- private List<TreeNodeWithContent<Labeled>> buldTree(TreeNodeWithContentFactory<TreeNodeWithContent<Labeled>> treeNodeFactory) {
+ private List<TreeNodeWithContent<Labeled>> buildTree(TreeNodeWithContentFactory<TreeNodeWithContent<Labeled>> treeNodeFactory) {
List<TreeNodeWithContent<Labeled>> firstLevelNodes = new ArrayList<TreeNodeWithContent<Labeled>>();
for(State state : companiesCache.keySet()) {
TreeNodeWithContent<Labeled> stateTreeNode = treeNodeFactory.createTreeNode(null, state);
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/WEB-INF/web.xml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -92,10 +92,6 @@
</welcome-file-list>
<error-page>
- <error-code>500</error-code>
- <location>/faces/error/500.xhtml</location>
- </error-page>
- <error-page>
<error-code>404</error-code>
<location>/faces/error/404.xhtml</location>
</error-page>
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/formQueue.xhtml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/formQueue.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/formQueue.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
- xmlns:c="http://java.sun.com/jsp/jstl/core">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
- <!--
+<!--
JBoss, Home of Professional Open Source
Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
@@ -27,110 +27,117 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
- <ui:composition template="/templates/template.xhtml">
- <ui:param name="dontRenderForm" value="true" />
+<ui:composition template="/templates/template.xhtml">
+ <ui:param name="dontRenderForm" value="true" />
- <ui:define name="view">
- <f:metadata>
- <f:viewParam name="templates" value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
- </ui:define>
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
- <ui:define name="head"/>
+ <ui:define name="head" />
- <ui:define name="outOfTemplateBefore">
+ <ui:define name="outOfTemplateBefore">
- <a4j:queue id="globalQueue"
- ignoreDupResponses="#{a4jQueueBean.globalQueue.attributes['ignoreDupResponses'].value}"
- onbeforedomupdate="#{a4jQueueBean.globalQueue.attributes['onbeforedomupdate'].value}"
- oncomplete="#{a4jQueueBean.globalQueue.attributes['oncomplete'].value}"
- onerror="#{a4jQueueBean.globalQueue.attributes['onerror'].value}"
- onevent="#{a4jQueueBean.globalQueue.attributes['onevent'].value}"
- onrequestdequeue="#{a4jQueueBean.globalQueue.attributes['onrequestdequeue'].value}"
- onrequestqueue="#{a4jQueueBean.globalQueue.attributes['onrequestqueue'].value}"
- onsubmit="#{a4jQueueBean.globalQueue.attributes['onsubmit'].value}"
- rendered="#{a4jQueueBean.globalQueue.attributes['rendered'].value}"
- requestDelay="#{a4jQueueBean.globalQueue.attributes['requestDelay'].value}"
- />
+ <a4j:queue id="globalQueue" ignoreDupResponses="#{a4jQueueBean.globalQueue.attributes['ignoreDupResponses'].value}"
+ onbeforedomupdate="#{a4jQueueBean.globalQueue.attributes['onbeforedomupdate'].value}"
+ oncomplete="#{a4jQueueBean.globalQueue.attributes['oncomplete'].value}"
+ onerror="#{a4jQueueBean.globalQueue.attributes['onerror'].value}"
+ onevent="#{a4jQueueBean.globalQueue.attributes['onevent'].value}"
+ onrequestdequeue="#{a4jQueueBean.globalQueue.attributes['onrequestdequeue'].value}"
+ onrequestqueue="#{a4jQueueBean.globalQueue.attributes['onrequestqueue'].value}"
+ onsubmit="#{a4jQueueBean.globalQueue.attributes['onsubmit'].value}"
+ rendered="#{a4jQueueBean.globalQueue.attributes['rendered'].value}"
+ requestDelay="#{a4jQueueBean.globalQueue.attributes['requestDelay'].value}" />
- </ui:define>
+ </ui:define>
- <ui:define name="component">
+ <ui:define name="component">
- <c:forEach var="i" begin="1" end="2" step="1">
- <rich:panel id="formQueue${i}Panel" header="Form Based Queue ${i}">
- <h:form id="formQueue${i}Form">
+ <c:forEach var="i" begin="1" end="2" step="1">
+ <rich:panel id="formQueue${i}Panel" header="Form Based Queue ${i}">
+ <h:form id="formQueue${i}Form">
- <a4j:queue id="queue"
- ignoreDupResponses="#{a4jQueueBean.formQueues[i-1].attributes['ignoreDupResponses'].value}"
- name="#{a4jQueueBean.formQueues[i-1].attributes['name'].value}"
- onbeforedomupdate="#{a4jQueueBean.formQueues[i-1].attributes['onbeforedomupdate'].value}"
- oncomplete="#{a4jQueueBean.formQueues[i-1].attributes['oncomplete'].value}"
- onerror="#{a4jQueueBean.formQueues[i-1].attributes['onerror'].value}"
- onevent="#{a4jQueueBean.formQueues[i-1].attributes['event'].value}"
- onrequestdequeue="#{a4jQueueBean.formQueues[i-1].attributes['onrequestdequeue'].value}"
- onrequestqueue="#{a4jQueueBean.formQueues[i-1].attributes['onrequestqueue'].value}"
- onsubmit="#{a4jQueueBean.formQueues[i-1].attributes['onsubmit'].value}"
- rendered="#{a4jQueueBean.formQueues[i-1].attributes['rendered'].value}"
- requestDelay="#{a4jQueueBean.formQueues[i-1].attributes['requestDelay'].value}"
- />
+ <a4j:queue id="queue"
+ ignoreDupResponses="#{a4jQueueBean.formQueues[i-1].attributes['ignoreDupResponses'].value}"
+ name="#{a4jQueueBean.formQueues[i-1].attributes['name'].value}"
+ onbeforedomupdate="#{a4jQueueBean.formQueues[i-1].attributes['onbeforedomupdate'].value}"
+ oncomplete="#{a4jQueueBean.formQueues[i-1].attributes['oncomplete'].value}"
+ onerror="#{a4jQueueBean.formQueues[i-1].attributes['onerror'].value}"
+ onevent="#{a4jQueueBean.formQueues[i-1].attributes['event'].value}"
+ onrequestdequeue="#{a4jQueueBean.formQueues[i-1].attributes['onrequestdequeue'].value}"
+ onrequestqueue="#{a4jQueueBean.formQueues[i-1].attributes['onrequestqueue'].value}"
+ onsubmit="#{a4jQueueBean.formQueues[i-1].attributes['onsubmit'].value}"
+ rendered="#{a4jQueueBean.formQueues[i-1].attributes['rendered'].value}"
+ requestDelay="#{a4jQueueBean.formQueues[i-1].attributes['requestDelay'].value}" />
- <script type="text/javascript">
+ <script type="text/javascript">
function add(element) {
element.innerHTML = 1 + parseInt(element.innerHTML);
}
</script>
- <h:panelGrid columns="2">
- <h:outputText value="Event 1:" />
- <h:inputText id="input1" value="#{a4jQueueBean.text}" onkeypress="add(#{rich:element('events1')}); #{rich:element('timeWatcher:grid')}.event(1); ">
- <a4j:ajax event="keypress" onbegin="add(#{rich:element('requests')}); #{rich:element('timeWatcher:grid')}.begin(); " render="outtext"
- oncomplete="#{rich:element('timeWatcher:grid')}.complete(); #{rich:element('timeWatcher:grid')}.difference();" onbeforedomupdate="add(#{rich:element('updates')}); " />
- </h:inputText>
- <h:outputText value="Event 2:" />
- <h:inputText id="input2" value="#{a4jQueueBean.text}" onkeypress="add(#{rich:element('events2')}); #{rich:element('timeWatcher:grid')}.event(2) ">
- <a4j:ajax event="keypress" onbegin="add(#{rich:element('requests')}); #{rich:element('timeWatcher:grid')}.begin(); " render="outtext"
- oncomplete="#{rich:element('timeWatcher:grid')}.complete(); #{rich:element('timeWatcher:grid')}.difference();" onbeforedomupdate="add(#{rich:element('updates')}); " />
- </h:inputText>
+ <h:panelGrid columns="2">
+ <h:outputText value="Event 1:" />
+ <h:inputText id="input1" value="#{a4jQueueBean.text}"
+ onkeypress="add(#{rich:element('events1')}); #{rich:element('timeWatcher:grid')}.event(1); ">
+ <a4j:ajax event="keypress"
+ onbegin="add(#{rich:element('requests')}); #{rich:element('timeWatcher:grid')}.begin(); "
+ render="outtext"
+ oncomplete="#{rich:element('timeWatcher:grid')}.complete(); #{rich:element('timeWatcher:grid')}.difference();"
+ onbeforedomupdate="add(#{rich:element('updates')}); " />
+ </h:inputText>
+ <h:outputText value="Event 2:" />
+ <h:inputText id="input2" value="#{a4jQueueBean.text}"
+ onkeypress="add(#{rich:element('events2')}); #{rich:element('timeWatcher:grid')}.event(2) ">
+ <a4j:ajax event="keypress"
+ onbegin="add(#{rich:element('requests')}); #{rich:element('timeWatcher:grid')}.begin(); "
+ render="outtext"
+ oncomplete="#{rich:element('timeWatcher:grid')}.complete(); #{rich:element('timeWatcher:grid')}.difference();"
+ onbeforedomupdate="add(#{rich:element('updates')}); " />
+ </h:inputText>
- <h:outputText value="Repeated text:" />
- <h:outputText value="#{a4jQueueBean.text}" id="outtext" style="font-weight:bold;" />
- <h:outputText value="Event 1 count:" />
- <h:outputText value="0" id="events1" />
- <h:outputText value="Event 2 count:" />
- <h:outputText value="0" id="events2" />
- <h:outputText value="Requests count:" />
- <h:outputText value="0" id="requests" />
- <h:outputText value="DOM updates count:" />
- <h:outputText value="0" id="updates" />
+ <h:outputText value="Repeated text:" />
+ <h:outputText value="#{a4jQueueBean.text}" id="outtext" style="font-weight:bold;" />
+ <h:outputText value="Click here (with error):" />
+ <a4j:commandButton id="errorButton" value="Action with error" action="#{richBean.causeError}" />
+ <h:outputText value="Event 1 count:" />
+ <h:outputText value="0" id="events1" />
+ <h:outputText value="Event 2 count:" />
+ <h:outputText value="0" id="events2" />
+ <h:outputText value="Requests count:" />
+ <h:outputText value="0" id="requests" />
+ <h:outputText value="DOM updates count:" />
+ <h:outputText value="0" id="updates" />
- </h:panelGrid>
+ </h:panelGrid>
- <metamer:clientTimeWatcher id="timeWatcher" events="2" />
+ <metamer:clientTimeWatcher id="timeWatcher" events="2" />
- </h:form>
- </rich:panel>
+ </h:form>
+ </rich:panel>
- </c:forEach>
+ </c:forEach>
- </ui:define>
+ </ui:define>
- <ui:define name="outOfTemplateAfter">
- <h:form id="attributeForm">
- <rich:panel id="formQueue1AttributesPanel" header="Form Queue 1 Attributes">
- <metamer:attributes value="#{a4jQueueBean.formQueue1.attributes}" id="formQueue1Attributes" />
- </rich:panel>
- <rich:panel id="formQueue2AttributesPanel" header="Form Queue 2 Attributes">
- <metamer:attributes value="#{a4jQueueBean.formQueue2.attributes}" id="formQueue2Attributes" />
- </rich:panel>
- <rich:panel id="globalQueueAttributesPanel" header="Global Queue Attributes">
- <metamer:attributes value="#{a4jQueueBean.globalQueue.attributes}" id="globalQueueAttributes" />
- </rich:panel>
- </h:form>
- </ui:define>
+ <ui:define name="outOfTemplateAfter">
+ <h:form id="attributeForm">
+ <rich:panel id="formQueue1AttributesPanel" header="Form Queue 1 Attributes">
+ <metamer:attributes value="#{a4jQueueBean.formQueue1.attributes}" id="formQueue1Attributes" />
+ </rich:panel>
+ <rich:panel id="formQueue2AttributesPanel" header="Form Queue 2 Attributes">
+ <metamer:attributes value="#{a4jQueueBean.formQueue2.attributes}" id="formQueue2Attributes" />
+ </rich:panel>
+ <rich:panel id="globalQueueAttributesPanel" header="Global Queue Attributes">
+ <metamer:attributes value="#{a4jQueueBean.globalQueue.attributes}" id="globalQueueAttributes" />
+ </rich:panel>
+ </h:form>
+ </ui:define>
- </ui:composition>
+</ui:composition>
</html>
\ No newline at end of file
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/globalQueue.xhtml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/globalQueue.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/a4jQueue/globalQueue.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -77,6 +77,9 @@
oncomplete="#{rich:element('timeWatcher:grid')}.complete(); #{rich:element('timeWatcher:grid')}.difference(); "
onbeforedomupdate="add(#{rich:element('updates')});" />
</h:commandButton>
+
+ <h:outputText value="Click here (with error):" />
+ <a4j:commandButton id="errorButton" value="Action" action="#{richBean.causeError}"/>
<h:outputText value="Repeated text:" />
<h:outputText value="#{a4jQueueBean.text}" id="outtext" style="font-weight:bold;" />
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richEditor/simple.xhtml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richEditor/simple.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/components/richEditor/simple.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -111,16 +111,16 @@
<fieldset>
<legend>JavaScript API of rich:editor by a4j:commandButton</legend>
- <a4j:commandButton value="getValue()" onclick="alert('Editor value: '+#{rich:component('editor')}.getValue());" />
- <a4j:commandButton value="setValue()" onclick="#{rich:component('editor')}.setValue('NEW VALUE SET BY JS!')" />
- <a4j:commandButton value="getInput()" onclick="alert('Inut value: '+#{rich:component('editor')}.getInput());" />
- <a4j:commandButton value="focus()" onclick="#{rich:component('editor')}.focus()" />
- <a4j:commandButton value="blur()" onclick="#{rich:component('editor')}.blur()" />
- <a4j:commandButton value="isFocused()" onclick="alert('Is editor focused: '+#{rich:component('editor')}.isFocused());" />
- <a4j:commandButton value="isDirty()" onclick="alert('Is editor dirty: '+#{rich:component('editor')}.isDirty());" />
- <a4j:commandButton value="isValueChanged()" onclick="alert('Is editor value changed: '+#{rich:component('editor')}.isValueChanged());" />
- <a4j:commandButton value="isReadonly()" onclick="alert('Is editor readonly: '+#{rich:component('editor')}.isReadonly());" />
- <a4j:commandButton value="setReadonly()" onclick="#{rich:component('editor')}.setReadonly()" />
+ <input type="button" value="getValue()" onclick="alert('Editor value: '+#{rich:component('editor')}.getValue());" />
+ <input type="button" value="setValue()" onclick="#{rich:component('editor')}.setValue('NEW VALUE SET BY JS!')" />
+ <input type="button" value="getInput()" onclick="alert('Inut value: '+#{rich:component('editor')}.getInput());" />
+ <input type="button" value="focus()" onclick="#{rich:component('editor')}.focus()" />
+ <input type="button" value="blur()" onclick="#{rich:component('editor')}.blur()" />
+ <input type="button" value="isFocused()" onclick="alert('Is editor focused: '+#{rich:component('editor')}.isFocused());" />
+ <input type="button" value="isDirty()" onclick="alert('Is editor dirty: '+#{rich:component('editor')}.isDirty());" />
+ <input type="button" value="isValueChanged()" onclick="alert('Is editor value changed: '+#{rich:component('editor')}.isValueChanged());" />
+ <input type="button" value="isReadonly()" onclick="alert('Is editor readonly: '+#{rich:component('editor')}.isReadonly());" />
+ <input type="button" value="setReadonly()" onclick="#{rich:component('editor')}.setReadonly()" />
</fieldset>
Modified: modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/header.xhtml
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/header.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/application/src/main/webapp/templates/header.xhtml 2012-01-09 14:55:52 UTC (rev 23134)
@@ -60,6 +60,9 @@
<f:facet name="start">
<h:outputText value="WORKING" style="color: red;" />
</f:facet>
+ <f:facet name="error">
+ <h:outputText value="ERROR" style="color: red;" />
+ </f:facet>
</a4j:status>
</a4j:outputPanel>
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -50,8 +50,6 @@
import org.apache.commons.lang.LocaleUtils;
import org.jboss.cheiron.retriever.ScriptEvaluationRetriever;
import org.jboss.test.selenium.AbstractTestCase;
-import org.jboss.test.selenium.SystemProperties;
-import org.jboss.test.selenium.browser.BrowserType;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.Attribute;
@@ -68,8 +66,6 @@
import org.richfaces.tests.metamer.TemplatesList;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Templates;
-import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
-import org.richfaces.tests.metamer.ftest.attributes.Attributes;
import org.testng.SkipException;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -35,6 +35,7 @@
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.framework.AjaxSelenium;
import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.geometry.Point;
import org.jboss.test.selenium.locator.JQueryLocator;
/**
@@ -53,7 +54,7 @@
JQueryLocator items = jq("div.rf-au-lst-cord[id$=autocompleteList] div[id$=autocompleteItems]");
JQueryLocator selection = items.getDescendant(jq("div.rf-au-itm-sel"));
JQueryLocator option = jq("div.rf-au-itm");
- JQueryLocator labeledOption = jq("div.rf-au-opt:contains('{0}')");
+ JQueryLocator labeledOption = jq("div.rf-au-opt:contains({0})");
public void typeKeys(String keys) {
for (int i = 0; i < keys.length(); i++) {
@@ -83,6 +84,19 @@
pressUp();
}
}
+
+ /**
+ * Method for select option from autocomplete suggestions. This method doesn't invoke/display suggestions.
+ * Is should be already done by another selenium invocation.
+ *
+ * For now, it is just selenium.clickAt()
+ *
+ * @param label
+ */
+ public void selectByMouse(String label) {
+ selenium.mouseOver(labeledOption.format(label));
+ selenium.clickAt(labeledOption.format(label), new Point(3, 3));
+ }
public boolean isLabeledOptionAvailable(String label) {
return selenium.isElementPresent(getLabeledOption(label));
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -81,6 +81,14 @@
assertCompletionVisible(false);
assertTrue(getAutocomplete().getInputText().toLowerCase().startsWith(getExpectedStateForPrefix().toLowerCase()));
}
+
+ @Test
+ public void testSimpleSelection() {
+ String expected = "Alaska"; // this item is 2nd if type filter "ala", so it ensure that it was not picked first item
+ typePrefix("ala");
+ autocomplete.selectByMouse(expected);
+ assertEquals(getAutocomplete().getInputText(), expected);
+ }
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-11323")
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestDateEditor.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestDateEditor.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestDateEditor.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -67,8 +67,8 @@
}
for (int i = 0; i < 10; i++) {
- assertTrue(selenium.isElementPresent(dateEditorYears.format(i)), "Date editor doesn't contain label for year " + (2007 + i));
- assertEquals(selenium.getText(dateEditorYears.format(i)), Integer.toString(2007 + i), "Label of year");
+ assertTrue(selenium.isElementPresent(dateEditorYears.format(i)), "Date editor doesn't contain label for year " + (2008 + i));
+ assertEquals(selenium.getText(dateEditorYears.format(i)), Integer.toString(2008 + i), "Label of year");
if (currentYear.equals(selenium.getText(dateEditorYears.format(i)))) {
assertTrue(selenium.belongsClass(dateEditorYears.format(i), "rf-cal-edtr-btn-sel"), "Current year should be selected.");
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuGroup/TestRichMenuGroup.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuGroup/TestRichMenuGroup.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richMenuGroup/TestRichMenuGroup.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -54,8 +54,8 @@
private JQueryLocator fileMenuList = pjq("div[id$=menu1_list]");
private JQueryLocator group = pjq("div[id$=menuGroup4]");
private JQueryLocator groupList = pjq("div[id$=menuGroup4_list]");
- private JQueryLocator icon = group.getDescendant(jq("> span.rf-ddm-itm-ic img"));
- private JQueryLocator emptyIcon = group.getDescendant(jq("> span.rf-ddm-itm-ic > div.rf-ddm-emptyIcon"));
+ private JQueryLocator icon = group.getDescendant(jq("> div.rf-ddm-itm-ic img"));
+ private JQueryLocator emptyIcon = group.getDescendant(jq("> div.rf-ddm-itm-ic > div.rf-ddm-emptyIcon"));
private JQueryLocator label = group.getDescendant(jq("span.rf-ddm-itm-lbl"));
private JQueryLocator menuItem41 = pjq("div[id$=menuItem41]");
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -26,7 +26,6 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.richfaces.tests.metamer.ftest.BasicAttributes.itemClass;
import static org.richfaces.tests.metamer.ftest.BasicAttributes.itemStyle;
-import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
@@ -51,10 +50,10 @@
private JQueryLocator toolbar = pjq("table[id$=toolbar]");
private JQueryLocator separator = pjq("td.rf-tb-sep");
- private JQueryLocator[] items = {pjq("td[id$=createDocument_itm]"), pjq("td[id$=createFolder_itm]"),
+ private JQueryLocator[] items = { pjq("td[id$=createDocument_itm]"), pjq("td[id$=createFolder_itm]"),
pjq("td[id$=copy_itm]"), pjq("td[id$=save_itm]"), pjq("td[id$=saveAs_itm]"), pjq("td[id$=saveAll_itm]"),
- pjq("td[id$=input_itm]"), pjq("td[id$=button_itm]")};
- private String[] separators = {"disc", "grid", "line", "square"};
+ pjq("td[id$=input_itm]"), pjq("td[id$=button_itm]") };
+ private String[] separators = { "disc", "grid", "line", "square" };
@Inject
@Use(empty = true)
private JQueryLocator item;
@@ -83,10 +82,14 @@
@Test
public void testHeight() {
- selenium.type(pjq("input[id$=heightInput]"), "");
+ AttributeLocator<?> attr = toolbar.getAttribute(Attribute.STYLE);
+ assertTrue(selenium.isAttributePresent(attr), "Attribute style should be present.");
+ assertTrue(selenium.getAttribute(attr).contains("height: 28px"), "Height in attribute style should be 28px");
+
+ selenium.type(pjq("input[id$=heightInput]"), "50px");
selenium.waitForPageToLoad();
- testHtmlAttribute(toolbar, "height", "50px");
+ assertTrue(selenium.getAttribute(attr).contains("height: 50px"), "Attribute style should have height 50px.");
}
@Test
@@ -127,7 +130,7 @@
selenium.waitForPageToLoad();
JQueryLocator separatorImg = separator.getDescendant(jq("> img"));
- AttributeLocator attr = separatorImg.getAttribute(Attribute.SRC);
+ AttributeLocator<?> attr = separatorImg.getAttribute(Attribute.SRC);
assertTrue(selenium.isElementPresent(separator), "Item separator should be present on the page.");
assertTrue(selenium.isElementPresent(separatorImg), "Item separator does not work correctly.");
@@ -142,7 +145,7 @@
selenium.waitForPageToLoad();
JQueryLocator separatorImg = separator.getDescendant(jq("> img"));
- AttributeLocator attr = separatorImg.getAttribute(Attribute.SRC);
+ AttributeLocator<?> attr = separatorImg.getAttribute(Attribute.SRC);
assertTrue(selenium.isElementPresent(separator), "Item separator should be present on the page.");
assertTrue(selenium.isElementPresent(separatorImg), "Item separator does not work correctly.");
@@ -230,21 +233,22 @@
public void testStyle() {
super.testStyle(toolbar);
}
-
+
@Test
public void testStyleClass() {
super.testStyleClass(toolbar);
}
-
+
@Test
public void testWidth() {
- AttributeLocator attr = toolbar.getAttribute(Attribute.WIDTH);
- assertTrue(selenium.isAttributePresent(attr), "Attribute width should be present.");
- assertEquals(selenium.getAttribute(attr), "100%", "Attribute width when it is not set.");
+ AttributeLocator<?> attr = toolbar.getAttribute(Attribute.STYLE);
+ assertTrue(selenium.isAttributePresent(attr), "Attribute style should be present.");
+ assertTrue(selenium.getAttribute(attr).contains("width: 100%"),
+ "Attribute style should have 100% width when it is not set.");
selenium.type(pjq("input[id$=widthInput]"), "500px");
selenium.waitForPageToLoad();
- assertTrue(selenium.getAttribute(attr).contains("500px"), "Attribute width should contain \"500px\".");
+ assertTrue(selenium.getAttribute(attr).contains("width: 500px"), "Attribute style should have width 500px.");
}
}
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -32,15 +32,14 @@
/**
* @author <a href="mailto:jpapouse@redhat.com">Jan Papousek</a>
*/
-public class AbstractTestTree extends AbstractMetamerTest {
+public abstract class AbstractTestTree extends AbstractMetamerTest {
@Inject
- @Use(strings = {"simpleSwingTreeNode", "simpleRichFacesTreeNode", "simpleRichFacesTreeDataModel"})
+ @Use(strings = { "simpleSwingTreeNode", "simpleRichFacesTreeNode", "simpleRichFacesTreeDataModel" })
private String sample;
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richTree/" + sample + ".xhtml");
}
-
}
Copied: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTreeSelection.java (from rev 23133, modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTreeSelection.java)
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTreeSelection.java (rev 0)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTreeSelection.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTree;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang.StringUtils;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.utils.text.SimplifiedFormat;
+import org.richfaces.component.SwitchType;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * @author <a href="mailto:jpapouse@redhat.com">Jan Papousek</a>
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ */
+public abstract class AbstractTestTreeSelection extends AbstractTestTree {
+
+ @Inject
+ @Use(value = "selectionTypes")
+ protected SwitchType selectionType;
+
+ protected SwitchType[] selectionTypes = new SwitchType[] { SwitchType.ajax, SwitchType.client };
+ protected SwitchType[] selectionTypeAjax = new SwitchType[] { SwitchType.ajax };
+ protected SwitchType[] selectionTypeClient = new SwitchType[] { SwitchType.client };
+ protected SwitchType[] eventEnabledSelectionTypes = new SwitchType[] { SwitchType.ajax };
+
+ protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
+ protected TreeNodeModel treeNode;
+
+ protected Integer[][] selectionPaths = new Integer[][] { { 4, 3 }, { 2, 1, 1 }, { 2 }, { 4, 10, 3 } };
+
+ private JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
+ private JQueryLocator selection = jq("span[id$=selection]");
+ private JQueryLocator clientId = jq("span[id$=selectionEventClientId]");
+ private JQueryLocator newSelection = jq("span[id$=selectionEventNewSelection]");
+ private JQueryLocator oldSelection = jq("span[id$=selectionEventOldSelection]");
+
+ @BeforeMethod
+ public void testInitialize() {
+ treeAttributes.set(TreeAttributes.selectionType, selectionType);
+ tree.setSelectionType(selectionType);
+ }
+
+ protected void testTopLevelSelection() {
+ assertEquals(tree.getAnySelectedNodesCount(), 0);
+
+ for (TreeNodeModel treeNode : tree.getNodes()) {
+ assertFalse(treeNode.isSelected());
+ assertTrue(treeNode.isCollapsed());
+ treeNode.select();
+ assertTrue(treeNode.isSelected());
+ assertTrue(treeNode.isCollapsed());
+
+ assertEquals(tree.getAnySelectedNodesCount(), 1);
+ }
+ }
+
+ protected void testSubNodesSelection() {
+ expandAll();
+ assertEquals(tree.getAnySelectedNodesCount(), 0);
+
+ for (Integer[] path : selectionPaths) {
+ treeNode = null;
+ for (int index : path) {
+ treeNode = (treeNode == null) ? tree.getNode(index) : treeNode.getNode(index);
+ }
+ assertFalse(treeNode.isSelected());
+ treeNode.select();
+ assertTrue(treeNode.isSelected());
+ assertEquals(tree.getAnySelectedNodesCount(), 1);
+ }
+ }
+
+ protected void testSubNodesSelectionEvents() {
+ expandAll();
+ Integer[] old = null;
+ for (Integer[] path : selectionPaths) {
+ treeNode = null;
+ for (int index : path) {
+ treeNode = (treeNode == null) ? tree.getNode(index) : treeNode.getNode(index);
+ }
+ treeNode.select();
+ assertEquals(getClientId(), "richTree");
+ assertEquals(
+ getSelection(),
+ path,
+ SimplifiedFormat.format("Actual Selection ({0}) doesn't correspond to expected ({1})",
+ Arrays.deepToString(getSelection()), Arrays.deepToString(path)));
+ assertEquals(
+ getNewSelection(),
+ path,
+ SimplifiedFormat.format("Actual New selection ({0}) doesn't correspond to expected ({1})",
+ Arrays.deepToString(getNewSelection()), Arrays.deepToString(path)));
+ if (old != null) {
+ assertEquals(
+ getOldSelection(),
+ old,
+ SimplifiedFormat.format("Actual Old selection ({0}) doesn't correspond to expected ({1})",
+ Arrays.deepToString(getOldSelection()), Arrays.deepToString(old)));
+ } else {
+ assertEquals(selenium.getText(oldSelection), "[]");
+ }
+ old = getNewSelection();
+ }
+ }
+
+ protected Integer[] getSelection() {
+ String string = selenium.getText(selection);
+ return getIntsFromString(string);
+ }
+
+ protected Integer[] getNewSelection() {
+ String string = selenium.getText(newSelection);
+ return getIntsFromString(string);
+ }
+
+ protected Integer[] getOldSelection() {
+ String string = selenium.getText(oldSelection);
+ return getIntsFromString(string);
+ }
+
+ protected String getClientId() {
+ return selenium.getText(clientId);
+ }
+
+ protected Integer[] getIntsFromString(String string) {
+ Pattern pattern = Pattern.compile(".*\\[((?:(?:\\d+)(?:, )?)+)\\].*");
+ Matcher matcher = pattern.matcher(string);
+ if (matcher.find()) {
+ String[] strings = StringUtils.split(matcher.group(1), ", ");
+ Integer[] numbers = new Integer[strings.length];
+ for (int i = 0; i < strings.length; i++) {
+ numbers[i] = Integer.valueOf(strings[i]) + 1;
+ }
+ return numbers;
+ }
+ throw new IllegalStateException("pattern does not match");
+ }
+
+ protected void expandAll() {
+ guardXhr(selenium).click(expandAll);
+ }
+}
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -26,6 +26,7 @@
import javax.faces.event.PhaseId;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -47,6 +48,7 @@
}
@Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode", "simpleRichFacesTreeDataModel" })
public void testPhasesSelection() {
tree.getNode(4).expand();
tree.getNode(4).getNode(3).select();
@@ -54,6 +56,13 @@
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "selection change listener invoked");
}
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ public void testPhasesSelectionWithSimpleTreeNode() {
+ testPhasesSelection();
+ }
+
@Test
public void testPhasesToggling() {
tree.getNode(2).expand();
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -21,158 +21,78 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richTree;
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import java.util.Arrays;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang.StringUtils;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.jboss.test.selenium.utils.text.SimplifiedFormat;
import org.richfaces.component.SwitchType;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.annotations.Uses;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a> * @author <a href="mailto:ppitonak@redhat.com">Pavol
+ * Pitonak</a>
* @version $Revision$
*/
-@Use(field = "selectionPaths", value = "")
-public class TestTreeSelection extends AbstractTestTree {
+public class TestTreeSelection extends AbstractTestTreeSelection {
- protected Integer[][] selectionPaths = new Integer[][] {{4, 3}, {1, 4}, {2, 1, 1}, {2}, {2, 1},
- {3, 5 }, {4, 10, 3 } };
-
- protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
- protected TreeNodeModel treeNode;
-
- @Inject
- @Use(value = "selectionTypes")
- SwitchType selectionType;
- SwitchType[] selectionTypes = new SwitchType[] {SwitchType.ajax, SwitchType.client};
- SwitchType[] eventEnabledSelectionTypes = new SwitchType[] {SwitchType.ajax};
-
- JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
- JQueryLocator selection = jq("span[id$=selection]");
- JQueryLocator clientId = jq("span[id$=selectionEventClientId]");
- JQueryLocator newSelection = jq("span[id$=selectionEventNewSelection]");
- JQueryLocator oldSelection = jq("span[id$=selectionEventOldSelection]");
-
- @BeforeMethod
- public void testInitialize() {
- treeAttributes.set(TreeAttributes.selectionType, selectionType);
- tree.setSelectionType(selectionType);
+ @Test
+ @Use(field = "selectionType", value = "selectionTypeClient")
+ public void testTopLevelSelectionClient() {
+ testTopLevelSelection();
}
@Test
- public void testTopLevelSelection() {
- assertEquals(tree.getAnySelectedNodesCount(), 0);
+ @Uses({ @Use(field = "selectionType", value = "selectionTypeAjax"),
+ @Use(field = "sample", strings = { "simpleSwingTreeNode", "simpleRichFacesTreeDataModel" }) })
+ public void testTopLevelSelectionAjax() {
+ testTopLevelSelection();
+ }
- for (TreeNodeModel treeNode : tree.getNodes()) {
- assertFalse(treeNode.isSelected());
- assertTrue(treeNode.isCollapsed());
- treeNode.select();
- assertTrue(treeNode.isSelected());
- assertTrue(treeNode.isCollapsed());
-
- assertEquals(tree.getAnySelectedNodesCount(), 1);
- }
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Uses({ @Use(field = "selectionType", value = "selectionTypeAjax"),
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" }) })
+ public void testTopLevelSelectionAjaxWithSimpleTreeNode() {
+ testTopLevelSelection();
}
@Test
- public void testSubNodesSelection() {
- expandAll();
- assertEquals(tree.getAnySelectedNodesCount(), 0);
-
- for (Integer[] path : selectionPaths) {
- treeNode = null;
- for (int index : path) {
- treeNode = (treeNode == null) ? tree.getNode(index) : treeNode.getNode(index);
- }
- assertFalse(treeNode.isSelected());
- treeNode.select();
- assertTrue(treeNode.isSelected());
- assertEquals(tree.getAnySelectedNodesCount(), 1);
- }
+ @Use(field = "selectionType", value = "selectionTypeClient")
+ public void testSubNodesSelectionClient() {
+ testSubNodesSelection();
}
@Test
- @Use(field = "selectionType", value = "eventEnabledSelectionTypes")
- public void testSubNodesSelectionEvents() {
- expandAll();
- Integer[] old = null;
- for (Integer[] path : selectionPaths) {
- treeNode = null;
- for (int index : path) {
- treeNode = (treeNode == null) ? tree.getNode(index) : treeNode.getNode(index);
- }
- treeNode.select();
- assertEquals(getClientId(), "richTree");
- assertEquals(
- getSelection(),
- path,
- SimplifiedFormat.format("Actual Selection ({0}) doesn't correspond to expected ({1})",
- Arrays.deepToString(getSelection()), Arrays.deepToString(path)));
- assertEquals(
- getNewSelection(),
- path,
- SimplifiedFormat.format("Actual New selection ({0}) doesn't correspond to expected ({1})",
- Arrays.deepToString(getNewSelection()), Arrays.deepToString(path)));
- if (old != null) {
- assertEquals(
- getOldSelection(),
- old,
- SimplifiedFormat.format("Actual Old selection ({0}) doesn't correspond to expected ({1})",
- Arrays.deepToString(getOldSelection()), Arrays.deepToString(old)));
- } else {
- assertEquals(selenium.getText(oldSelection), "[]");
- }
- old = getNewSelection();
- }
+ @Uses({ @Use(field = "selectionType", value = "selectionTypeAjax"),
+ @Use(field = "sample", strings = { "simpleSwingTreeNode", "simpleRichFacesTreeDataModel" }) })
+ public void testSubNodesSelectionAjax() {
+ testSubNodesSelection();
}
- protected void expandAll() {
- guardXhr(selenium).click(expandAll);
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Uses({ @Use(field = "selectionType", value = "selectionTypeAjax"),
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" }) })
+ public void testSubNodesSelectionAjaxWithSimpleTreeNode() {
+ testSubNodesSelection();
}
- protected Integer[] getIntsFromString(String string) {
- Pattern pattern = Pattern.compile(".*\\[((?:(?:\\d+)(?:, )?)+)\\].*");
- Matcher matcher = pattern.matcher(string);
- if (matcher.find()) {
- String[] strings = StringUtils.split(matcher.group(1), ", ");
- Integer[] numbers = new Integer[strings.length];
- for (int i = 0; i < strings.length; i++) {
- numbers[i] = Integer.valueOf(strings[i]) + 1;
- }
- return numbers;
- }
- throw new IllegalStateException("pattern does not match");
+ @Test
+ @Uses({ @Use(field = "selectionType", value = "eventEnabledSelectionTypes"),
+ @Use(field = "sample", strings = { "simpleSwingTreeNode", "simpleRichFacesTreeDataModel" }) })
+ public void testSubNodesSelectionEventsAjax() {
+ testSubNodesSelectionEvents();
}
- private Integer[] getSelection() {
- String string = selenium.getText(selection);
- return getIntsFromString(string);
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Uses({ @Use(field = "selectionType", value = "eventEnabledSelectionTypes"),
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" }) })
+ public void testSubNodesSelectionEventsAjaxWithSimpleTreeNode() {
+ testSubNodesSelectionEvents();
}
- private Integer[] getNewSelection() {
- String string = selenium.getText(newSelection);
- return getIntsFromString(string);
- }
-
- private Integer[] getOldSelection() {
- String string = selenium.getText(oldSelection);
- return getIntsFromString(string);
- }
-
- private String getClientId() {
- return selenium.getText(clientId);
- }
}
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -243,6 +243,7 @@
}
@Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode", "simpleRichFacesTreeDataModel" })
@Templates(exclude = "a4jRegion")
public void testSelectionClientSideEvents() {
String[] events = new String[] { "beforeselectionchange", "begin", "beforedomupdate", "complete",
@@ -252,6 +253,14 @@
testRequestEventsAfter(events);
}
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ @Templates(exclude = "a4jRegion")
+ public void testSelectionClientSideEventsWithSimpleTreeNode() {
+ testSelectionClientSideEvents();
+ }
+
@Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11319")
@Templates(value = "a4jRegion")
Modified: modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
===================================================================
--- modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2012-01-06 16:36:16 UTC (rev 23133)
+++ modules/tests/metamer/branches/wfk2-product-branch/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2012-01-09 14:55:52 UTC (rev 23134)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -33,7 +33,7 @@
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.annotations.Uses;
-import org.richfaces.tests.metamer.ftest.richTree.TestTreeSelection;
+import org.richfaces.tests.metamer.ftest.richTree.AbstractTestTreeSelection;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -41,15 +41,15 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class TestTreeModelAdaptorSelection extends TestTreeSelection {
-
+public class TestTreeModelAdaptorSelection extends AbstractTestTreeSelection {
+
@Inject
PathsCrate paths;
- PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] {{2, 1, 3 }, {3, 3, 2, 2 } });
- PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] {{2, 1, 5 }, {3, 3, 2, 6 } });
- PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] {{4, 1, 10, 2 },
- {1, 4, 3, 11, 4 } });
-
+ PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][] { { 2, 1, 3 }, { 3, 3, 2, 2 } });
+ PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] { { 2, 1, 5 }, { 3, 3, 2, 6 } });
+ PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new Integer[][] { { 4, 1, 10, 2 },
+ { 1, 4, 3, 11, 4 } });
+
@Inject
@Use(enumeration = true)
private RecursiveModelRepresentation representation;
@@ -76,23 +76,23 @@
}
@Test
+ @Use(field = "paths", empty = true)
@Override
- @Use(field = "paths", empty = true)
public void testTopLevelSelection() {
super.testTopLevelSelection();
}
@Test
+ @Use(field = "paths", value = "paths*")
@Override
- @Use(field = "paths", value = "paths*")
public void testSubNodesSelection() {
super.testSubNodesSelection();
}
@Test
- @Override
@Uses({ @Use(field = "paths", value = "paths*"),
@Use(field = "selectionType", value = "eventEnabledSelectionTypes") })
+ @Override
public void testSubNodesSelectionEvents() {
super.testSubNodesSelectionEvents();
}
12 years, 11 months
JBoss Rich Faces SVN: r23133 - in modules/tests/metamer/branches/contextMenu: application/src/main/webapp/components/richContextMenu and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2012-01-06 11:36:16 -0500 (Fri, 06 Jan 2012)
New Revision: 23133
Added:
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/components.xhtml
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/pic9.jpg
modules/tests/metamer/branches/contextMenu/notes
Modified:
modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/list.xhtml
Log:
RF-10197: Add more placeholders for rich:contextMenu
Add more container which should trigger display contextMenu.
Added: modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/components.xhtml
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/components.xhtml (rev 0)
+++ modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/components.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+
+ </ui:define>
+
+ <ui:define name="component">
+
+ <table>
+ <thead>
+ <td>h:graphicImage</td>
+ <td>h:dataTable</td>
+ <td>h:outputText</td>
+ <td>div</td>
+ <td>rich:panelGroup</td>
+ </thead>
+ <tfoot>
+ <td><i>form:imageClick</i></td>
+ <td><i>form:tableClick</i></td>
+ <td><i>form:outputTextClick</i></td>
+ <td><i>divClick</i></td>
+ <td><i>form:panelClick</i></td>
+ </tfoot>
+ <tr>
+ <td>
+ <h:graphicImage id="imageClick" value="/resources/images/pics/pic9.jpg" style="border : 5px solid #E4EAEF"/>
+ </td>
+ <td>
+ <h:dataTable id="tableClick" style="width:150px; height: 130px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF" />
+ </td>
+ <td>
+ <h:outputLabel id="outputTextClick" value="outputTextClick" />
+ </td>
+ <td>
+ <div id="divClick" style="width:120px; height: 100px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF"/>
+
+ </td>
+ <td>
+ <h:panelGroup id="panelClick" layout="block" style="width:120px; height: 100px; background-color: lightgreen; padding: 10px; border: 5px solid #E4EAEF;"/>
+ </td>
+ </tr>
+ </table>
+
+ <rich:contextMenu id="ctxmenu"
+ attachTo="#{richContextMenuBean.attributes['attachTo'].value}"
+ dir="#{richContextMenuBean.attributes['dir'].value}"
+ direction="#{richContextMenuBean.attributes['direction'].value}"
+ disabled="#{richContextMenuBean.attributes['disabled'].value}"
+ hideDelay="#{richContextMenuBean.attributes['hideDelay'].value}"
+ horizontalOffset="#{richContextMenuBean.attributes['horizontalOffset'].value}"
+ jointPoint="#{richContextMenuBean.attributes['jointPoint'].value}"
+ label="#{richContextMenuBean.attributes['label'].value}"
+ lang="#{richContextMenuBean.attributes['lang'].value}"
+ mode="#{richContextMenuBean.attributes['mode'].value}"
+ onclick="#{richContextMenuBean.attributes['onclick'].value}"
+ ondblclick="#{richContextMenuBean.attributes[''].value}"
+ ongrouphide="#{richContextMenuBean.attributes['ongrouphide'].value}"
+ ongroupshow="#{richContextMenuBean.attributes['ongroupshow'].value}"
+ onhide="#{richContextMenuBean.attributes['onhide'].value}"
+ onitemclick="#{richContextMenuBean.attributes['onitemclick'].value}"
+ onkeydown="#{richContextMenuBean.attributes['onkeydown'].value}"
+ onkeypress="#{richContextMenuBean.attributes['onkeypress'].value}"
+ onkeyup="#{richContextMenuBean.attributes['onkeyup'].value}"
+ onmousedown="#{richContextMenuBean.attributes['onmousedown'].value}"
+ onmousemove="#{richContextMenuBean.attributes['onmousemove'].value}"
+ onmouseout="#{richContextMenuBean.attributes['onmouseout'].value}"
+ onmouseover="#{richContextMenuBean.attributes['onmouseover'].value}"
+ onmouseup="#{richContextMenuBean.attributes['onmouseup'].value}"
+ onshow="#{richContextMenuBean.attributes['onshow'].value}"
+ popupWidth="#{richContextMenuBean.attributes['popupWidth'].value}"
+ rendered="#{richContextMenuBean.attributes['rendered'].value}"
+ showDelay="#{richContextMenuBean.attributes['showDelay'].value}"
+ showEvent="#{richContextMenuBean.attributes['showEvent'].value}"
+ style="#{richContextMenuBean.attributes['showEvent'].value}"
+ styleClass="#{richContextMenuBean.attributes['styleClass'].value}"
+ title="#{richContextMenuBean.attributes['title'].value}"
+ verticalOffset="#{richContextMenuBean.attributes['verticalOffset'].value}"
+ >
+ <rich:menuItem id="menuItem31" label="Save" icon="/resources/images/icons/save.gif" />
+ <rich:menuItem id="zin" label="Zoom In" onclick="enlarge('imageClick');" />
+ <rich:menuItem id="zout" label="Zoom Out" onclick="decrease('imageClick');" />
+ </rich:contextMenu>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richContextMenuBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/list.xhtml
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/list.xhtml 2012-01-05 18:17:39 UTC (rev 23132)
+++ modules/tests/metamer/branches/contextMenu/application/src/main/webapp/components/richContextMenu/list.xhtml 2012-01-06 16:36:16 UTC (rev 23133)
@@ -34,6 +34,10 @@
<metamer:testPageLink id="simple" outcome="simple" value="Simple">
Simple page that contains rich:contextMenu
</metamer:testPageLink>
+
+ <metamer:testPageLink id="components" outcome="components" value="Various components as placeholder">
+ Simple page that contains various components as placeholder to invoke rich:contextMenu
+ </metamer:testPageLink>
</ui:define>
Added: modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/pic9.jpg
===================================================================
--- modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/pic9.jpg (rev 0)
+++ modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/pic9.jpg 2012-01-06 16:36:16 UTC (rev 23133)
@@ -0,0 +1,65 @@
+����
+
+
+
+
+
+��
+��Ǐ�p{g�
+%!O7�'E�����:*F���
+��G�2SIF;}���ǖ~'�Ou����m�
+�b�[-���5��.�/_3�U��ȭ�
+��JPC#=�bڴ�58~�҂��E۔.�Sݢ bv���L#�$��
+tG�Ri�f�f]���r�j��R0�#,E-��G!Rh���Qb��s�#�oo$�VI�Oo�XH��ʵ4�`4�)�;7�ED���J��m�r2�ڸs8�������0jOVi��/B���p0F
+�ˆ��_Kq�Θw�Xq�HB�䞞���a���c�T���T&���O)�#S��(g=��<�k���-��w�{���LK�:�:�pK���H���R��Bof�R���L������B�J�
+�A!�M�L��J���F#ա����r� ]�b%fa�
+�� K/C\��:�kf�t�Ӧ��!K{������+j/�2��p�=G�H�M=���5��V�/�����k쮽�����N�m��s�L_�Z��
+\�kgg-��Giaj��y�DQF���~�v��V�/��9���C����e�G�E'6����K���Q �F�/�4��.N]�Э8��2�T�����I�\�v�\�Lr<�hUl+W-�(fnt��|���er��Muf�yVIm�ӓ���02\��g���Ӥ:�|����o��4��,fJĠ��]�#��\+F��$3�)�TR�N'�Qk-��id��Vn��H�"�(Q���"�2���얡Ml]Ի����Wݤ�`&�{y��n
+B�@ ����#
+R�
+jK濘�rZFX��:�g�Q(��.� 4!hG�W��vtY�����|���&4)e4�<iQ�Z�Y_?1�I�9�d/��2��HFG��bo:�J48Q⸑R�BȦH��l��<(�`Z:#�����k=��km<˛��u�R�FV�QP�1���4�3j��
+yc@��wt��eL9@�
+F(��#H=?��M8铖��
+g�7��xɏu��H�&��F�t4�Ԫ(�&�o�r�\�SL�z�^I�n.8r̒�纽�Id{��T�R3;��wv,I,jY�qϩ}B�����&f
+D�D*j<��8e�)��dwi,b6�PU�d
+9b��Z��eܢ��xڕ�
+B
+���',��"�t/���p72{��q�_���:I_(U�`Z�x�w{;�0�~�J�U�.�G[sK-���0y�5i
+�1�G�|��웵�m7p\�M�s ��̩r�YYe��:�������-��57=�*W%���
+Dg����v��)�0,{�x����ס��y��q�6y�`5NaI�T�#H5L-���R8N�����i�}�7h@anДJ���GDY)[�$�2��W���"A
+Gg����z��Ԛ(�vA�j��dKt�
+*�J�<�$�}0��;�夿Fiֿ2[Au%�NG�cM�l��,���?RT�-��WW�x1J�L��k���m�s��{���Os1�<�"+ZP%G`�2��r��ߵ���3X[���kwrHH�@}SL�UZ�J��jR�oL�����r�4��7�U��s%��j�
+�H��
+Q%M2ɶ�a��w���%a��r��M"깙�8�R��G��&�\��h��w��o����f�k�
+Ck&�θ$[E
+:���'Prœ$�R�EO�i���$����Kw�eɁ��'�j��7-��l���o$��مK}�vYc�Ʒhk��{E
+��Qp�6�قG�ʕ۱OًI([���aHm"�}�
+�%��v0#���T�8���
+��B�\�6�c�����)I���"ߕ�-%+�ʝ��b��a|Ȫ7�x4;>��,�y�lf�]D��2�0�F$�Z�k"L��W5[m3��$�O�=��l{`cWv�y�.x4�I �!��
++� ��q�BW�#���6Lc�����
+B�H@����� �)�f
+�!�cb$��^!k�q�[b��T�&t P5H�������5�ȸ�-$0F�n��������5�ۉY�R�._M��E�����z��
+���Ƹ�����2�P�Ȓ
+X�X�caN��َ+SS�<�
+�YDF�ڈd*=5�P%}$��scS�7QdH
+h
+0*�lc�Y��WX�r�-�w>�T���:4�1��mѢ;b�h�9ԻU��cp�@�a��bU�T}Fg�ְ�[v/Q|�Ӫ�%�!�\�0�
++C�7fyu�Q�Nw['5?1|x��R�T�����
+��4�mt�Q'�|������.���9��hhY*(�0?��z�*��H/X�}�g\��;��ڻ�����X=z�O:,�R;s&�~�z2yM'��`;�~�8R3�<�֜5ۂB; <��>�&�$!!��I�9�p�M���~���1����r�)�{�W����
+�^���
+��
+��f�C�����q�)K�~�ŁY��n��
+k��}���
\ No newline at end of file
Property changes on: modules/tests/metamer/branches/contextMenu/application/src/main/webapp/resources/images/pics/pic9.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: modules/tests/metamer/branches/contextMenu/notes
===================================================================
--- modules/tests/metamer/branches/contextMenu/notes (rev 0)
+++ modules/tests/metamer/branches/contextMenu/notes 2012-01-06 16:36:16 UTC (rev 23133)
@@ -0,0 +1,22 @@
+
+label: where should this attribute value apears
+
+showEvent: list of attacheable events (format)
+
+onmouseup: it is ok that this event is triggered before menu show? (so, you get this event everytime you click to trigger menu show)
+
+Doesn't work within following containers:
+ - Rich Collapsible Sub Table
+ - Rich Data Table
+ - Rich Data Grid
+ - Rich Exatended Data Table
+ - Rich List
+ - JSF Data Table
+ - UI Repeat
+ - A4j Repeat
+
+
+
+
+
+<h:outputScript library="script" name="picturesUtils.js"/>
12 years, 11 months