JBoss Rich Faces SVN: r19325 - in trunk/ui/iteration/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-23 11:45:24 -0400 (Thu, 23 Sep 2010)
New Revision: 19325
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.ecss
Log:
RF-9291
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-09-23 14:37:35 UTC (rev 19324)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-09-23 15:45:24 UTC (rev 19325)
@@ -322,7 +322,7 @@
}
public String getFirstRowSkinClass() {
- return "rf-dt-f-r";
+ return "rf-dt-fst-r";
}
public String getCellSkinClass() {
@@ -330,55 +330,55 @@
}
public String getHeaderSkinClass() {
- return "rf-dt-h";
+ return "rf-dt-hdr";
}
public String getHeaderFirstSkinClass() {
- return "rf-dt-h-f";
+ return "rf-dt-hdr-fst";
}
public String getHeaderCellSkinClass() {
- return "rf-dt-h-c";
+ return "rf-dt-hdr-c";
}
public String getColumnHeaderSkinClass() {
- return "rf-dt-sh";
+ return "rf-dt-shdr";
}
public String getColumnHeaderFirstSkinClass() {
- return "rf-dt-sh-f";
+ return "rf-dt-shdr-fst";
}
public String getColumnHeaderCellSkinClass() {
- return "rf-dt-sh-c";
+ return "rf-dt-shdr-c";
}
public String getColumnFooterSkinClass() {
- return "rf-dt-sf";
+ return "rf-dt-sftr";
}
public String getColumnFooterFirstSkinClass() {
- return "rf-dt-sf-f";
+ return "rf-dt-sftr-fst";
}
public String getColumnFooterCellSkinClass() {
- return "rf-dt-sf-c";
+ return "rf-dt-sftr-c";
}
public String getFooterSkinClass() {
- return "rf-dt-f";
+ return "rf-dt-ftr";
}
public String getFooterFirstSkinClass() {
- return "rf-dt-f-f";
+ return "rf-dt-ftr-fst";
}
public String getFooterCellSkinClass() {
- return "rf-dt-f-c";
+ return "rf-dt-ftr-c";
}
public String getNoDataClass() {
- return "rf-dt-nd-c";
+ return "rf-dt-ndt";
}
protected void setupTableStartElement(FacesContext context, UIComponent component) {
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-09-23 14:37:35 UTC (rev 19324)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-09-23 15:45:24 UTC (rev 19325)
@@ -298,15 +298,15 @@
}
public String getFirstRowSkinClass() {
- return "rf-st-f-r";
+ return "rf-st-fst-r";
}
public String getHeaderRowSkinClass() {
- return "rf-st-h-r";
+ return "rf-st-hdr-r";
}
public String getHeaderFirstRowSkinClass() {
- return "rf-st-h-f-r";
+ return "rf-st-hdr-fst-r";
}
public String getCellSkinClass() {
@@ -314,55 +314,55 @@
}
public String getHeaderCellSkinClass() {
- return "rf-st-h-c";
+ return "rf-st-hdr-c";
}
public String getColumnHeaderCellSkinClass() {
- return "rf-st-sh-c";
+ return "rf-st-shdr-c";
}
public String getColumnHeaderSkinClass() {
- return "rf-st-sh";
+ return "rf-st-shdr";
}
public String getFooterSkinClass() {
- return "rf-st-f";
+ return "rf-st-ftr";
}
public String getFooterCellSkinClass() {
- return "rf-st-f-c";
+ return "rf-st-ftr-c";
}
public String getFooterFirstRowSkinClass() {
- return "rf-st-f-f";
+ return "rf-st-ftr-fst";
}
public String getColumnFooterCellSkinClass() {
- return "rf-st-sf-c";
+ return "rf-st-sftr-c";
}
public String getColumnFooterSkinClass() {
- return "rf-st-sf";
+ return "rf-st-sftr";
}
public String getColumnFooterFirstSkinClass() {
- return "rf-st-sf-f";
+ return "rf-st-sftr-fst";
}
public String getColumnHeaderFirstSkinClass() {
- return "rf-st-sh-f";
+ return "rf-st-shdr-fst";
}
public String getFooterFirstSkinClass() {
- return "rf-st-f-f";
+ return "rf-st-ftr-fst";
}
public String getHeaderFirstSkinClass() {
- return "rf-st-h-f";
+ return "rf-st-hdr-fst";
}
public String getHeaderSkinClass() {
- return "rf-st-h";
+ return "rf-st-hdr";
}
public String getNoDataClass() {
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.ecss 2010-09-23 14:37:35 UTC (rev 19324)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.ecss 2010-09-23 15:45:24 UTC (rev 19325)
@@ -16,7 +16,7 @@
.rf-dt-r{
}
-.rf-dt-f-r{
+.rf-dt-fst-r{
}
.rf-dt-c{
@@ -32,7 +32,7 @@
padding:4px;
}
-.rf-dt-nd-c{
+.rf-dt-ndt{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -45,13 +45,13 @@
padding:4px;
}
-.rf-dt-h{
+.rf-dt-hdr{
}
-.rf-dt-h-f{
+.rf-dt-hdr-fst{
}
-.rf-dt-h-c{
+.rf-dt-hdr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -69,13 +69,13 @@
text-align:center;
}
-.rf-dt-sh {
+.rf-dt-shdr {
}
-.rf-dt-sh-f {
+.rf-dt-shdr-fst {
}
-.rf-dt-sh-c{
+.rf-dt-shdr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -93,13 +93,13 @@
text-align:center;
}
-.rf-dt-sf{
+.rf-dt-sftr{
}
-.rf-dt-sf-f{
+.rf-dt-sftr-fst{
}
-.rf-dt-sf-c{
+.rf-dt-sftr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -123,14 +123,14 @@
border-bottom-color:'#{richSkin.tableBorderColor}';
}
-.rf-dt-f {
+.rf-dt-ftr {
}
-.rf-dt-f-f{
+.rf-dt-ftr-fst{
}
-.rf-dt-f-c{
+.rf-dt-ftr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -152,13 +152,13 @@
.rf-st-r{
}
-.rf-st-f-r{
+.rf-st-fst-r{
}
-.rf-st-h-r{
+.rf-st-hdr-r{
}
-.rf-st-h-f-r{
+.rf-st-hdr-fst-r{
}
.rf-st-c{
@@ -175,7 +175,7 @@
padding:4px;
}
-.rf-st-h-c{
+.rf-st-hdr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -191,7 +191,7 @@
text-align:left;
}
-.rf-st-sh-c{
+.rf-st-shdr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -206,13 +206,13 @@
padding:4px;
}
-.rf-st-sh{
+.rf-st-shdr{
}
-.rf-st-f {
+.rf-st-ftr {
}
-.rf-st-f-c{
+.rf-st-ftr-c{
border-bottom-width:3px;
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -228,7 +228,7 @@
text-align:left;
}
-.rf-st-sf-c{
+.rf-st-sftr-c{
border-bottom-width:'#{richSkin.tableBorderWidth}';
border-bottom-style:solid;
border-bottom-color:'#{richSkin.tableBorderColor}';
@@ -242,22 +242,22 @@
padding:4px;
}
-.rf-st-sf{
+.rf-st-sftr{
}
-.rf-st-sf-f{
+.rf-st-sftr-fst{
}
-.rf-st-sh-f{
+.rf-st-shdr-fst{
}
-.rf-st-f-f{
+.rf-st-ftr-fst{
}
-.rf-st-h-f{
+.rf-st-hdr-fst{
}
-.rf-st-h{
+.rf-st-hdr{
}
14 years, 3 months
JBoss Rich Faces SVN: r19324 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-23 10:37:35 -0400 (Thu, 23 Sep 2010)
New Revision: 19324
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java
Log:
https://jira.jboss.org/browse/RFPL-817
* added new Selenium tests for a4j:ajax with various components
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionValue;
+import static org.testng.Assert.assertEquals;
+
+import javax.faces.event.PhaseId;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+
+/**
+ * Abstract test case for testing h:selectManyMenu and h:selectManyListbox with a4j:ajax.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public abstract class AbstractTestSelectMany extends AbstractMetamerTest {
+
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+
+ public void testClick(JQueryLocator input) {
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("[Ferrari, Lexus]",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong output1");
+ assertEquals(selenium.getText(output2), "[Audi, Ferrari, Lexus]", "Wrong output2");
+ }
+
+ public void testBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testData(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ public void testImmediate(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Audi, Ferrari, Lexus]", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testImmediateBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testLimitRender(JQueryLocator input) {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ public void testRender(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).addSelection(input, optionValue("Audi"));
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong output1");
+ assertEquals(selenium.getText(output2), "[Ferrari, Lexus]", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionValue;
+import static org.testng.Assert.assertEquals;
+
+import javax.faces.event.PhaseId;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+
+/**
+ * Abstract test case for testing h:selectOneMenu and h:selectOneListbox with a4j:ajax.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public abstract class AbstractTestSelectOne extends AbstractMetamerTest {
+
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+
+ public void testClick(JQueryLocator input) {
+ guardXhr(selenium).select(input, optionValue("Audi"));
+
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("[Ferrari, Lexus]",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "Audi", "Wrong output1");
+ assertEquals(selenium.getText(output2), "Audi", "Wrong output2");
+ }
+
+ public void testBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testData(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ public void testImmediate(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Audi", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testImmediateBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testLimitRender(JQueryLocator input) {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ public void testRender(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).select(input, optionValue("Audi"));
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "Audi", "Wrong output1");
+ assertEquals(selenium.getText(output2), "Ferrari", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+
+import javax.faces.event.PhaseId;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectBooleanCheckbox.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectBooleanCheckbox extends AbstractMetamerTest {
+
+ private JQueryLocator input = pjq("input[type=checkbox][id$=selectBooleanCheckbox]");
+ private JQueryLocator output1 = pjq("div[id$=output1]");
+ private JQueryLocator output2 = pjq("div[id$=output2]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectBooleanCheckbox.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ guardXhr(selenium).click(input);
+
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("false",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "true", "Wrong output1");
+ assertEquals(selenium.getText(output2), "true", "Wrong output2");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "false", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ @Test
+ public void testImmediate() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "true", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "false", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testLimitRender() {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ @Test
+ public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("false",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "true", "Wrong output1");
+ assertEquals(selenium.getText(output2), "false", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectBooleanCheckbox.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+
+import javax.faces.event.PhaseId;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectManyCheckbox.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectManyCheckbox extends AbstractMetamerTest {
+
+ private JQueryLocator input = pjq("table[id$=selectManyCheckbox] input[value=Audi]");
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectManyCheckbox.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ guardXhr(selenium).click(input);
+
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("[Ferrari, Lexus]",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong output1");
+ assertEquals(selenium.getText(output2), "[Audi, Ferrari, Lexus]", "Wrong output2");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ @Test
+ public void testImmediate() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Audi, Ferrari, Lexus]", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "[Ferrari, Lexus]", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testLimitRender() {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ @Test
+ public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "[Audi, Ferrari, Lexus]", "Wrong output1");
+ assertEquals(selenium.getText(output2), "[Ferrari, Lexus]", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyCheckbox.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectManyListbox.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectManyListbox extends AbstractTestSelectMany {
+
+ private JQueryLocator input = pjq("select[id$=selectManyListbox]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectManyListbox.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ super.testClick(input);
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyListbox.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectManyMenu.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectManyMenu extends AbstractTestSelectMany {
+
+ private JQueryLocator input = pjq("select[id$=selectManyMenu]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectManyMenu.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ super.testClick(input);
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectManyMenu.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectOneListbox.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectOneListbox extends AbstractTestSelectOne {
+
+ private JQueryLocator input = pjq("select[id$=selectOneListbox]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectOneListbox.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ super.testClick(input);
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneListbox.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectOneMenu.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectOneMenu extends AbstractTestSelectOne {
+
+ private JQueryLocator input = pjq("select[id$=selectOneMenu]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectOneMenu.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ super.testClick(input);
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneMenu.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java 2010-09-23 14:37:35 UTC (rev 19324)
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import javax.faces.event.PhaseId;
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hSelectOneRadio.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHSelectOneRadio extends AbstractMetamerTest {
+
+ private JQueryLocator input = pjq("table[id$=selectOneRadio] input[type=radio][value=Audi]");
+ private JQueryLocator output1 = pjq("span[id$=output1]");
+ private JQueryLocator output2 = pjq("span[id$=output2]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hSelectOneRadio.xhtml");
+ }
+
+ @Test
+ public void testSimpleClick() {
+ guardXhr(selenium).click(input);
+
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("[Ferrari, Lexus]",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "Audi", "Wrong output1");
+ assertEquals(selenium.getText(output2), "Audi", "Wrong output2");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ @Test
+ public void testImmediate() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Audi", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "Ferrari", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ @Test
+ public void testLimitRender() {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ @Test
+ public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(input);
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(input);
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "Audi", "Wrong output1");
+ assertEquals(selenium.getText(output2), "Ferrari", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHSelectOneRadio.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 3 months
JBoss Rich Faces SVN: r19323 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-23 09:53:42 -0400 (Thu, 23 Sep 2010)
New Revision: 19323
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
Log:
* ID of components changed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2010-09-23 11:19:07 UTC (rev 19322)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2010-09-23 13:53:42 UTC (rev 19323)
@@ -40,7 +40,7 @@
</ui:define>
<ui:define name="component">
- <h:selectOneListbox id="selectManyListbox" value="#{a4jAjaxBean.car}">
+ <h:selectOneListbox id="selectOneListbox" value="#{a4jAjaxBean.car}">
<f:selectItem itemValue="Audi"/>
<f:selectItem itemValue="Mercedes"/>
<f:selectItem itemValue="Ferrari"/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2010-09-23 11:19:07 UTC (rev 19322)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2010-09-23 13:53:42 UTC (rev 19323)
@@ -40,7 +40,7 @@
</ui:define>
<ui:define name="component">
- <h:selectOneMenu id="selectManyMenu" value="#{a4jAjaxBean.car}" >
+ <h:selectOneMenu id="selectOneMenu" value="#{a4jAjaxBean.car}" >
<f:selectItem itemValue="Audi" itemLabel="Audi"/>
<f:selectItem itemValue="Mercedes" itemLabel="Mercedes"/>
<f:selectItem itemValue="Ferrari" itemLabel="Ferrari"/>
14 years, 3 months
JBoss Rich Faces SVN: r19322 - in modules/tests/metamer/trunk: application/src/main/webapp/components/a4jRegion and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-23 07:19:07 -0400 (Thu, 23 Sep 2010)
New Revision: 19322
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-decoration.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-insertion.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
Log:
a4j:region tests in nested ui:decorate and ui:insert (RFPL-724)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2010-09-23 09:32:03 UTC (rev 19321)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2010-09-23 11:19:07 UTC (rev 19322)
@@ -38,7 +38,7 @@
/**
* Managed bean for a4j:region.
- *
+ *
* @author Exadel, Nick Belaevski, <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
@@ -50,7 +50,8 @@
private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[] { new SelectItem(null, "default"),
new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@region"), new SelectItem("@this"),
new SelectItem("outerValueInput", "Outer"), new SelectItem("regionValueInput", "Region"),
- new SelectItem("nestedRegionValueInput", "Nested region") };
+ new SelectItem("nestedRegionValueInput", "Nested region"),
+ new SelectItem("decorationValueInput", "Decoration"), new SelectItem("insertionValueInput", "Insertion") };
private static Logger logger;
// for page simple.xhtml
private Attributes attributes;
@@ -60,10 +61,48 @@
private String execute;
private String nestedExecute;
private String outerExecute;
+ private String decorationExecute;
+ private String decorationValue;
+ private String insertionExecute;
+
+ public String getInsertionExecute() {
+ return insertionExecute;
+ }
+
+ public void setInsertionExecute(String insertionExecute) {
+ this.insertionExecute = insertionExecute;
+ }
+
+ public String getInsertionValue() {
+ return insertionValue;
+ }
+
+ public void setInsertionValue(String insertionValue) {
+ this.insertionValue = insertionValue;
+ }
+
+ private String insertionValue;
+
+ public String getDecorationExecute() {
+ return decorationExecute;
+ }
+
+ public void setDecorationExecute(String decorationExecute) {
+ this.decorationExecute = decorationExecute;
+ }
+
+ public String getDecorationValue() {
+ return decorationValue;
+ }
+
+ public void setDecorationValue(String decorationValue) {
+ this.decorationValue = decorationValue;
+ }
+
private String outerValue;
private String regionValue;
private String nestedRegionValue;
- private String lastExecutedLinkValue;
+ private String lastExecutedButtonValue;
/**
* Initializes the managed bean.
@@ -160,11 +199,11 @@
}
public void handleBehavior(AjaxBehaviorEvent event) {
- lastExecutedLinkValue = (String) event.getComponent().getAttributes().get("value");
+ lastExecutedButtonValue = (String) event.getComponent().getAttributes().get("value");
}
- public String getLastExecutedLinkValue() {
- return lastExecutedLinkValue;
+ public String getLastExecutedButtonValue() {
+ return lastExecutedButtonValue;
}
public void handleDefaultsValueChange(ValueChangeEvent event) {
@@ -172,6 +211,9 @@
setOuterExecute(newValue);
setExecute(newValue);
+ setDecorationExecute(newValue);
+ setInsertionExecute(newValue);
setNestedExecute(newValue);
+
}
}
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-decoration.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-decoration.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-decoration.xhtml 2010-09-23 11:19:07 UTC (rev 19322)
@@ -0,0 +1,57 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, 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.
+-->
+
+<!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">
+
+<ui:composition>
+
+ <fieldset>
+
+ <legend>Decoration</legend>
+
+ <h:panelGrid columns="3">
+ <h:inputText id="decorationValueInput"
+ value="#{a4jRegionBean.decorationValue}" />
+
+ <h:commandButton id="decorationValueButton" value="Decoration">
+ <a4j:ajax id="decorationValueAjax"
+ listener="#{a4jRegionBean.handleBehavior}"
+ execute="#{a4jRegionBean.decorationExecute}" render="outputValues" />
+ </h:commandButton>
+ <h:selectOneMenu id="decorationSelect"
+ value="#{a4jRegionBean.decorationExecute}">
+ <f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="decorationSelect" execute="@this" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+
+ </fieldset>
+
+</ui:composition>
+
+
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-insertion.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-insertion.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested-insertion.xhtml 2010-09-23 11:19:07 UTC (rev 19322)
@@ -0,0 +1,55 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, 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.
+-->
+
+<!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">
+
+<ui:composition>
+
+ <fieldset>
+
+ <legend>Insertion</legend>
+
+ <h:panelGrid columns="3">
+ <h:inputText id="insertionValueInput"
+ value="#{a4jRegionBean.insertionValue}" />
+ <h:commandButton id="insertionValueButton" value="Insertion">
+ <a4j:ajax id="insertionValueAjax"
+ listener="#{a4jRegionBean.handleBehavior}"
+ execute="#{a4jRegionBean.insertionExecute}" render="outputValues" />
+ </h:commandButton>
+ <h:selectOneMenu id="insertionSelect"
+ value="#{a4jRegionBean.insertionExecute}">
+ <f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="insertionSelect" execute="@this" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+
+ </fieldset>
+
+</ui:composition>
+
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml 2010-09-23 09:32:03 UTC (rev 19321)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml 2010-09-23 11:19:07 UTC (rev 19322)
@@ -61,26 +61,8 @@
<h:outputLabel id="defaultSelectLabel" value="Defaults for all" for="defaultsSelect"/>
<h:selectOneMenu id="defaultsSelect" valueChangeListener="#{a4jRegionBean.handleDefaultsValueChange}">
<f:selectItems value="#{a4jRegionBean.executeOptions}" />
- <a4j:ajax event="change" render="outerSelect, regionSelect, nestedRegionSelect" execute="@this"/>
+ <a4j:ajax event="change" render="outerSelect, regionSelect, decorationSelect, insertionSelect, nestedRegionSelect" execute="@this"/>
</h:selectOneMenu>
-
- <h:outputLabel id="outerSelectLabel" value="Outer" for="outerSelect"/>
- <h:selectOneMenu id="outerSelect" value="#{a4jRegionBean.outerExecute}">
- <f:selectItems value="#{a4jRegionBean.executeOptions}" />
- <a4j:ajax event="change" render="outerSelect" execute="@this"/>
- </h:selectOneMenu>
-
- <h:outputLabel id="regionSelectLabel" value="Region" for="regionSelect"/>
- <h:selectOneMenu id="regionSelect" value="#{a4jRegionBean.execute}">
- <f:selectItems value="#{a4jRegionBean.executeOptions}" />
- <a4j:ajax event="change" render="regionSelect" execute="@this"/>
- </h:selectOneMenu>
-
- <h:outputLabel id="nestedRegionSelectLabel" value="Nested region" for="nestedRegionSelect" />
- <h:selectOneMenu id="nestedRegionSelect" value="#{a4jRegionBean.nestedExecute}">
- <f:selectItems value="#{a4jRegionBean.executeOptions}" />
- <a4j:ajax event="change" render="nestedRegionSelect" execute="@this"/>
- </h:selectOneMenu>
</h:panelGrid>
@@ -93,8 +75,10 @@
<h:panelGrid columns="2" >
Outer: <h:outputText id="outerValueOutput" value="#{a4jRegionBean.outerValue}" />
Region: <h:outputText id="regionValueOutput" value="#{a4jRegionBean.regionValue}" />
+ Decoration: <h:outputText id="decorationValueOutput" value="#{a4jRegionBean.decorationValue}" />
+ Insertion: <h:outputText id="insertionValueOutput" value="#{a4jRegionBean.insertionValue}" />
Nested region: <h:outputText id="nestedRegionValueOutput" value="#{a4jRegionBean.nestedRegionValue}" />
- Last executed link value: <h:outputText id="lastLinkOutput" value="#{a4jRegionBean.lastExecutedLinkValue}" />
+ Last executed button value: <h:outputText id="lastButtonOutput" value="#{a4jRegionBean.lastExecutedButtonValue}" />
</h:panelGrid>
</h:panelGroup>
</fieldset>
@@ -104,32 +88,56 @@
<br/>
<br/>
- <h:inputText id="outerValueInput" value="#{a4jRegionBean.outerValue}" />
+ <!-- OUTER -->
+ <h:panelGrid columns="3">
+ <h:inputText id="outerValueInput" value="#{a4jRegionBean.outerValue}" />
+
+ <h:commandButton id="outerValueButton" value="Outer">
+ <a4j:ajax id="outerValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.outerExecute}" render="outputValues" />
+ </h:commandButton>
+
+ <h:selectOneMenu id="outerSelect" value="#{a4jRegionBean.outerExecute}">
+ <f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="outerSelect" execute="@this"/>
+ </h:selectOneMenu>
+ </h:panelGrid>
- <h:commandLink id="outerValueLink" value="Outer">
- <a4j:ajax id="outerValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.outerExecute}" render="outputValues" />
- </h:commandLink>
-
+ <!-- REGION -->
<fieldset>
<legend>Region</legend>
+
<a4j:region id="outerRegion">
- <h:inputText id="regionValueInput" value="#{a4jRegionBean.regionValue}" />
+ <h:panelGrid columns="3">
+ <h:inputText id="regionValueInput" value="#{a4jRegionBean.regionValue}" />
+
+ <h:commandButton id="regionValueButton" value="Region">
+ <a4j:ajax id="regionValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.execute}" render="outputValues" />
+ </h:commandButton>
+
+ <h:selectOneMenu id="regionSelect" value="#{a4jRegionBean.execute}">
+ <f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="regionSelect" execute="@this"/>
+ </h:selectOneMenu>
+ </h:panelGrid>
+
+ <ui:decorate template="nested-decoration.xhtml" />
+ <ui:decorate template="nested-insertion.xhtml" />
- <h:commandLink id="regionValueLink" value="Region">
- <a4j:ajax id="regionValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.execute}" render="outputValues" />
- </h:commandLink>
-
<fieldset>
<legend>Nested region</legend>
<a4j:region id="nestedRegion">
<h:inputText id="nestedRegionValueInput" value="#{a4jRegionBean.nestedRegionValue}" />
- <h:commandLink id="nestedRegionValueLink" value="Nested region">
+ <h:commandButton id="nestedRegionValueButton" value="Nested region">
<a4j:ajax id="nestedRegionValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.nestedExecute}" render="outputValues" />
- </h:commandLink>
-
+ </h:commandButton>
+
+ <h:selectOneMenu id="nestedRegionSelect" value="#{a4jRegionBean.nestedExecute}">
+ <f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="nestedRegionSelect" execute="@this"/>
+ </h:selectOneMenu>
</a4j:region>
</fieldset>
</a4j:region>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java 2010-09-23 09:32:03 UTC (rev 19321)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java 2010-09-23 11:19:07 UTC (rev 19322)
@@ -74,7 +74,7 @@
}
public enum Component {
- OUTER("Outer"), REGION("Region"), NESTED("Nested region");
+ OUTER("Outer"), REGION("Region"), NESTED("Nested region"), DECORATION("Decoration"), INSERTION("Insertion");
public final JQueryLocator select;
public final JQueryLocator output;
@@ -88,7 +88,7 @@
this.select = pjq("select[id$={0}Select]").format(id);
this.output = pjq("span[id$={0}ValueOutput]").format(id);
this.input = pjq("input:text[id$={0}ValueInput]").format(id);
- this.link = pjq("a[id$={0}ValueLink]").format(id);
+ this.link = pjq("input:submit[id$={0}ValueButton]").format(id);
this.executeOption = optionLabel(name);
}
@@ -105,7 +105,8 @@
public enum Execute {
DEFAULT("default"), ALL("@all"), REGION("@region"), FORM("@form"), THIS("@this"), COMPONENT_OUTER(
- Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONENT_NESTED(Component.NESTED);
+ Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONENT_NESTED(Component.NESTED), COMPONENT_DECORATION(
+ Component.DECORATION), COMPONENT_INSERTION(Component.INSERTION);
public final OptionLocator<?> option;
public final Component componentBase;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java 2010-09-23 09:32:03 UTC (rev 19321)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java 2010-09-23 11:19:07 UTC (rev 19322)
@@ -1,6 +1,3 @@
-package org.richfaces.tests.metamer.ftest.a4jRegion;
-
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
/*******************************************************************************
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and individual contributors
@@ -22,6 +19,9 @@
* 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.a4jRegion;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
import static org.testng.Assert.assertEquals;
@@ -88,9 +88,8 @@
}
if (execute == Execute.REGION) {
- if (component == Component.REGION) {
- expectedChanges.add(Component.REGION);
- expectedChanges.add(Component.NESTED);
+ if (EnumSet.of(Component.REGION, Component.INSERTION, Component.DECORATION).contains(component)) {
+ expectedChanges = EnumSet.complementOf(EnumSet.of(Component.OUTER));
} else if (component == Component.NESTED) {
expectedChanges.add(Component.NESTED);
}
14 years, 3 months
JBoss Rich Faces SVN: r19321 - in modules/tests/metamer/trunk: application/src/main/webapp/components/a4jRegion and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-23 05:32:03 -0400 (Thu, 23 Sep 2010)
New Revision: 19321
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml
Log:
initial tests for a4j:region - nested sample (RFPL-724)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2010-09-23 09:30:45 UTC (rev 19320)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JRegionBean.java 2010-09-23 09:32:03 UTC (rev 19321)
@@ -47,9 +47,10 @@
public class A4JRegionBean implements Serializable {
private static final long serialVersionUID = -1L;
- private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[]{
- new SelectItem(null, "default"), new SelectItem("@region"), new SelectItem("@all"), new SelectItem("@this")
- };
+ private static final SelectItem[] AVAILABLE_EXECUTE_OPTIONS = new SelectItem[] { new SelectItem(null, "default"),
+ new SelectItem("@all"), new SelectItem("@form"), new SelectItem("@region"), new SelectItem("@this"),
+ new SelectItem("outerValueInput", "Outer"), new SelectItem("regionValueInput", "Region"),
+ new SelectItem("nestedRegionValueInput", "Nested region") };
private static Logger logger;
// for page simple.xhtml
private Attributes attributes;
@@ -151,12 +152,10 @@
}
public String getOuterExecute() {
- logger.error("getOuterExecute " + outerExecute);
return outerExecute;
}
public void setOuterExecute(String outerExecute) {
- logger.error("setOuterExecute " + outerExecute);
this.outerExecute = outerExecute;
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml 2010-09-23 09:30:45 UTC (rev 19320)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRegion/nested.xhtml 2010-09-23 09:32:03 UTC (rev 19321)
@@ -64,19 +64,22 @@
<a4j:ajax event="change" render="outerSelect, regionSelect, nestedRegionSelect" execute="@this"/>
</h:selectOneMenu>
- <h:outputLabel id="outerSelectLabel" value="Out of region" for="outerSelect"/>
- <h:selectOneMenu id="outerSelect" value="#{a4jRegionBean.outerExecute}" onchange="submit()">
+ <h:outputLabel id="outerSelectLabel" value="Outer" for="outerSelect"/>
+ <h:selectOneMenu id="outerSelect" value="#{a4jRegionBean.outerExecute}">
<f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="outerSelect" execute="@this"/>
</h:selectOneMenu>
<h:outputLabel id="regionSelectLabel" value="Region" for="regionSelect"/>
- <h:selectOneMenu id="regionSelect" value="#{a4jRegionBean.execute}" onchange="submit()">
+ <h:selectOneMenu id="regionSelect" value="#{a4jRegionBean.execute}">
<f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="regionSelect" execute="@this"/>
</h:selectOneMenu>
<h:outputLabel id="nestedRegionSelectLabel" value="Nested region" for="nestedRegionSelect" />
- <h:selectOneMenu id="nestedRegionSelect" value="#{a4jRegionBean.nestedExecute}" onchange="submit()">
+ <h:selectOneMenu id="nestedRegionSelect" value="#{a4jRegionBean.nestedExecute}">
<f:selectItems value="#{a4jRegionBean.executeOptions}" />
+ <a4j:ajax event="change" render="nestedRegionSelect" execute="@this"/>
</h:selectOneMenu>
</h:panelGrid>
@@ -103,7 +106,7 @@
<h:inputText id="outerValueInput" value="#{a4jRegionBean.outerValue}" />
- <h:commandLink id="outerValueLink" value="Out of region">
+ <h:commandLink id="outerValueLink" value="Outer">
<a4j:ajax id="outerValueAjax" listener="#{a4jRegionBean.handleBehavior}" execute="#{a4jRegionBean.outerExecute}" render="outputValues" />
</h:commandLink>
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/NestedRegionModel.java 2010-09-23 09:32:03 UTC (rev 19321)
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jRegion;
+
+import org.apache.commons.lang.WordUtils;
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.ElementLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.locator.option.OptionLocator;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.waitXhr;
+import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
+import static org.testng.Assert.assertTrue;
+import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionLabel;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class NestedRegionModel {
+
+ private static AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+
+ private static ThreadLocal<Integer> sequence = new ThreadLocal<Integer>() {
+ protected Integer initialValue() {
+ return 0;
+ };
+ };
+
+ private JQueryLocator selectDefaults = pjq("select[id$=defaultsSelect]");
+
+ public void setDefaultExecute(Execute execute) {
+ selectOrFireChange(selectDefaults, execute.option);
+ }
+
+ public void setExecute(Component component, Execute execute) {
+ selectOrFireChange(component.select, execute.option);
+ }
+
+ private void selectOrFireChange(ElementLocator<?> selectLocator, OptionLocator<?> optionLocator) {
+ if (optionLocator.getRawLocator().equals(selenium.getSelectedLabel(selectLocator))) {
+ waitXhr(selenium).fireEvent(selectLocator, Event.CHANGE);
+ } else {
+ waitXhr(selenium).select(selectLocator, optionLocator);
+ }
+ }
+
+ public void changeInputs() {
+ sequence.set(sequence.get() + 1);
+ for (Component component : Component.values()) {
+ selenium.type(component.input, Integer.toString(sequence.get()));
+ }
+ }
+
+ public enum Component {
+ OUTER("Outer"), REGION("Region"), NESTED("Nested region");
+
+ public final JQueryLocator select;
+ public final JQueryLocator output;
+ public final JQueryLocator input;
+ public final JQueryLocator link;
+ public final OptionLocator<?> executeOption;
+
+ private Component(String name) {
+ String id = name.substring(0, 1).toLowerCase() + WordUtils.capitalize(name).replace(" ", "").substring(1);
+
+ this.select = pjq("select[id$={0}Select]").format(id);
+ this.output = pjq("span[id$={0}ValueOutput]").format(id);
+ this.input = pjq("input:text[id$={0}ValueInput]").format(id);
+ this.link = pjq("a[id$={0}ValueLink]").format(id);
+ this.executeOption = optionLabel(name);
+ }
+
+ public void fireAction() {
+ waitXhr(selenium).click(link);
+ }
+
+ public boolean isChanged() {
+ final String out = selenium.getText(output);
+ assertTrue("".equals(out) || Integer.toString(sequence.get()).equals(out));
+ return Integer.toString(sequence.get()).equals(out);
+ }
+ }
+
+ public enum Execute {
+ DEFAULT("default"), ALL("@all"), REGION("@region"), FORM("@form"), THIS("@this"), COMPONENT_OUTER(
+ Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONENT_NESTED(Component.NESTED);
+
+ public final OptionLocator<?> option;
+ public final Component componentBase;
+
+ private Execute(String label) {
+ this.option = optionLabel(label);
+ this.componentBase = null;
+ }
+
+ private Execute(Component component) {
+ this.option = component.executeOption;
+ this.componentBase = component;
+ }
+
+ public boolean isComponentBased() {
+ return componentBase != null;
+ }
+ }
+}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRegion/TestNestedRegion.java 2010-09-23 09:32:03 UTC (rev 19321)
@@ -0,0 +1,132 @@
+package org.richfaces.tests.metamer.ftest.a4jRegion;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ *******************************************************************************/
+import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.EnumSet;
+
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.a4jRegion.NestedRegionModel.Component;
+import org.richfaces.tests.metamer.ftest.a4jRegion.NestedRegionModel.Execute;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestNestedRegion extends AbstractMetamerTest {
+
+ NestedRegionModel model = new NestedRegionModel();
+
+ @Inject
+ @Use("components")
+ Component component;
+ Component[] components = Component.values();
+
+ @Inject
+ @Use("executes")
+ Execute execute;
+ Execute[] executes = Execute.values();
+
+ EnumSet<Component> expectedChanges;
+ EnumSet<Component> actualChanges;
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jRegion/nested.xhtml");
+ }
+
+ @Test
+ public void test() {
+ model.setExecute(component, execute);
+ model.changeInputs();
+ component.fireAction();
+
+ countExpectedChanges();
+ obtainActualChanges();
+ checkChanged();
+ }
+
+ private void countExpectedChanges() {
+ expectedChanges = EnumSet.noneOf(Component.class);
+
+ if (execute == Execute.DEFAULT) {
+ if (component == Component.OUTER) {
+ execute = Execute.THIS;
+ } else {
+ execute = Execute.REGION;
+ }
+ }
+
+ if (execute == Execute.ALL || execute == Execute.FORM) {
+ expectedChanges = EnumSet.allOf(Component.class);
+ }
+
+ if (execute == Execute.REGION) {
+ if (component == Component.REGION) {
+ expectedChanges.add(Component.REGION);
+ expectedChanges.add(Component.NESTED);
+ } else if (component == Component.NESTED) {
+ expectedChanges.add(Component.NESTED);
+ }
+ }
+
+ if (execute.isComponentBased()) {
+ expectedChanges.add(execute.componentBase);
+ }
+ }
+
+ private void obtainActualChanges() {
+ actualChanges = EnumSet.noneOf(Component.class);
+ for (Component component : Component.values()) {
+ if (component.isChanged()) {
+ actualChanges.add(component);
+ }
+ }
+ }
+
+ private void checkChanged() {
+ EnumSet<Component> missing = EnumSet.copyOf(expectedChanges);
+ missing.removeAll(actualChanges);
+
+ EnumSet<Component> redundant = EnumSet.complementOf(expectedChanges);
+ redundant.retainAll(actualChanges);
+
+ StringBuilder message = new StringBuilder(format("Component: {0}, Execute: {1}; ", component, execute));
+
+ if (!missing.isEmpty()) {
+ message.append("Expected to change: " + missing + "; ");
+ }
+
+ if (!redundant.isEmpty()) {
+ message.append("Expected to not change: " + redundant + "; ");
+ }
+
+ assertEquals(actualChanges, expectedChanges, message.toString());
+ }
+}
14 years, 3 months
JBoss Rich Faces SVN: r19320 - modules/tests/metamer/trunk/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-23 05:30:45 -0400 (Thu, 23 Sep 2010)
New Revision: 19320
Added:
modules/tests/metamer/trunk/ftest/selenium-server.sh
Log:
added shell script for starting selenium server separately from Mavem
Added: modules/tests/metamer/trunk/ftest/selenium-server.sh
===================================================================
--- modules/tests/metamer/trunk/ftest/selenium-server.sh (rev 0)
+++ modules/tests/metamer/trunk/ftest/selenium-server.sh 2010-09-23 09:30:45 UTC (rev 19320)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+SERVER="target/selenium-server-standalone.jar"
+LOG="target/selenium/selenium-server.log"
+PORT=8444
+
+mkdir -p `dirname $LOG` || true
+
+if [ ! -f "$SERVER" ]; then
+ mvn process-resources -Dselenium.server.skip=true -Dselenium.test.skip=true -Pprovide-selenium-server-standalone || exit 1
+fi
+
+java -jar $SERVER -log $LOG -port $PORT -browserSessionReuse $*
14 years, 3 months
JBoss Rich Faces SVN: r19319 - in trunk/ui/iteration/ui/src: main/resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-09-22 14:22:03 -0400 (Wed, 22 Sep 2010)
New Revision: 19319
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
Log:
RF-9292
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-09-22 17:06:22 UTC (rev 19318)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-09-22 18:22:03 UTC (rev 19319)
@@ -221,7 +221,7 @@
if (column.isRendered()) {
writer.startElement(HtmlConstants.TD_ELEM, column);
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-efc rf-edt-cw-"
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-ftr-c-emp rf-edt-c-"
+ column.getId(), null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.endElement(HtmlConstants.TD_ELEM);
@@ -236,20 +236,21 @@
writer.startElement(HtmlConstants.TD_ELEM, column);
if ("header".equals(facetName)) {
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rsh rf-edt-cw-"
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rsz-cntr rf-edt-c-"
+ column.getId(), null);
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rs", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rsz", null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.endElement(HtmlConstants.DIV_ELEM);
}
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer
- .writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, HtmlUtil.concatClasses("rf-edt-" + facetName.charAt(0) + "c",
- "rf-edt-cw-" + column.getId(), (String) column.getAttributes().get(classAttribute)),
- null);
+ writer.writeAttribute(
+ HtmlConstants.CLASS_ATTRIBUTE,
+ HtmlUtil.concatClasses("rf-edt-" + facetName.charAt(0) + facetName.charAt(3) + "r-c", "rf-edt-c-"
+ + column.getId(), (String) column.getAttributes().get(classAttribute)), null);
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-" + facetName.charAt(0) + "cc", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-" + facetName.charAt(0) + facetName.charAt(3)
+ + "r-c-cnt", null);
UIComponent facet = column.getFacet(facetName);
if (facet != null && facet.isRendered()) {
facet.encodeAll(context);
@@ -267,8 +268,8 @@
boolean columnFacetPresent = table.isColumnFacetPresent(name);
if (columnFacetPresent || "footer".equals(name)) {
writer.startElement(HtmlConstants.DIV_ELEM, table);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, HtmlUtil.concatClasses("rf-edt-" + name.charAt(0),
- (String) table.getAttributes().get(name + "Class")), null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, HtmlUtil.concatClasses("rf-edt-" + name.charAt(0)
+ + name.charAt(3) + "r", (String) table.getAttributes().get(name + "Class")), null);
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);
writer.writeAttribute(HtmlConstants.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HtmlConstants.CELLSPACING_ATTRIBUTE, "0", null);
@@ -281,7 +282,7 @@
if (columns.hasNext()) {
writer.startElement(HtmlConstants.TD_ELEM, table);
if (PartName.frozen.equals(partName) && "footer".equals(name)) {
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-fa", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-ftr-fzn", null);
}
writer.startElement(HtmlConstants.DIV_ELEM, table);
if (PartName.frozen.equals(partName)) {
@@ -292,7 +293,7 @@
} else {
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, table.getClientId(context) + ":" + name, null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-"
- + ("footer".equals(name) ? "f" : "") + "p rf-edt-pw", null);
+ + ("footer".equals(name) ? "ftr-" : "") + "cnt", null);
}
String tableId = table.getClientId(context) + ":cf" + name.charAt(0) + partName.name().charAt(0);
@@ -343,7 +344,7 @@
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, elementId, null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-th", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-tbl-hdr", null);
header.encodeAll(context);
writer.endElement(HtmlConstants.DIV_ELEM);
@@ -377,7 +378,7 @@
table.getAttributes().put("clientFirst", 0);
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.startElement(HtmlConstants.DIV_ELEM, table);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-s", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-spcr", null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);
writer.writeAttribute(HtmlConstants.CELLPADDING_ATTRIBUTE, "0", null);
@@ -390,7 +391,7 @@
PartName partName = state.nextPart().getName();
if (PartName.normal.equals(partName)) {
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, table.getClientId(context) + ":body", null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-p rf-edt-pw", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-cnt", null);
}
String targetId = table.getClientId(context) + ":tbt" + partName.name().charAt(0);
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);
@@ -432,7 +433,7 @@
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, elementId, null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-tf", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-tbl-ftr", null);
footer.encodeAll(context);
writer.endElement(HtmlConstants.DIV_ELEM);
@@ -607,11 +608,11 @@
throws IOException {
writer.startElement(HtmlConstants.DIV_ELEM, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, component.getClientId(context) + ":d", null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-d", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rsz-mkr", null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.startElement(HtmlConstants.TABLE_ELEMENT, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, component.getClientId(context) + ":r", null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-ro", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rord", null);
writer.writeAttribute(HtmlConstants.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HtmlConstants.CELLSPACING_ATTRIBUTE, "0", null);
writer.startElement(HtmlConstants.TR_ELEMENT, component);
@@ -629,7 +630,7 @@
writer.endElement(HtmlConstants.TABLE_ELEMENT);
writer.startElement(HtmlConstants.DIV_ELEM, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, component.getClientId(context) + ":rm", null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rom", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-rord-mkr", null);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.startElement(HtmlConstants.INPUT_ELEM, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, component.getClientId(context) + ":wi", null);
@@ -682,7 +683,7 @@
UIDataTableBase table = state.getRow();
writer.startElement("style", table);
writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/css", null);
- writer.writeText(".rf-edt-pw {", null); // TODO getNormalizedId(context, state.getGrid())
+ writer.writeText(".rf-edt-cnt, .rf-edt-ftr-cnt {", null); // TODO getNormalizedId(context, state.getGrid())
writer.writeText("width: 100%;", "width");
writer.writeText("}", null);
Iterator<UIComponent> columns = table.columns();
@@ -694,7 +695,7 @@
id = column.getId();
}
String width = getColumnWidth(column);
- writer.writeText(".rf-edt-cw-" + id + " {", "width"); // TODO getNormalizedId(context,
+ writer.writeText(".rf-edt-c-" + id + " {", "width"); // TODO getNormalizedId(context,
writer.writeText("width: " + width + ";", "width");
writer.writeText("}", "width");
}
@@ -709,19 +710,19 @@
StringBuilder builder = new StringBuilder();
Collection<Object> selection = table.getSelection();
if (selection != null && selection.contains(table.getRowKey())) {
- builder.append("rf-edt-r-s");
+ builder.append("rf-edt-r-sel");
}
if (table.getRowKey().equals(table.getAttributes().get("activeRowKey"))) {
if (builder.length() > 0) {
builder.append(' ');
}
- builder.append("rf-edt-r-a");
+ builder.append("rf-edt-r-act");
}
if (table.getRowKey().equals(table.getAttributes().get("shiftRowKey"))) {
if (builder.length() > 0) {
builder.append(' ');
}
- builder.append("rf-edt-r-t");
+ builder.append("rf-edt-r-sht");
}
if (builder.length() > 0) {
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, builder.toString(), null);
@@ -736,10 +737,10 @@
if (column.isRendered()) {
writer.startElement(HtmlConstants.TD_ELEM, table);
writer.startElement(HtmlConstants.DIV_ELEM, table);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-c rf-edt-cw-"
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-c rf-edt-c-"
+ column.getId(), null);
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-cc", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-c-cnt", null);
renderChildren(facesContext, column);
writer.endElement(HtmlConstants.DIV_ELEM);
writer.endElement(HtmlConstants.DIV_ELEM);
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2010-09-22 17:06:22 UTC (rev 19318)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2010-09-22 18:22:03 UTC (rev 19319)
@@ -25,11 +25,11 @@
border: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
-.rf-edt-h, .rf-edt-th {
+.rf-edt-hdr, .rf-edt-tbl-hdr {
background-image : "url(#{resource['org.richfaces.images:colHdrGrad.png']})";
}
-.rf-edt-th {
+.rf-edt-tbl-hdr {
border-bottom: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
@@ -39,36 +39,36 @@
width: 100%;
}
-.rf-edt-s {
+.rf-edt-spcr {
height: 0px;
font-size: 0px; /*for IE7 only*/
}
-.rf-edt-f, .rf-edt-tf {
+.rf-edt-ftr, .rf-edt-tbl-ftr {
border-top: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
background-color: '#{richSkin.tableFooterBackgroundColor}';
}
-.rf-edt-fa {
+.rf-edt-ftr-fzn {
vertical-align: top;
}
-.rf-edt-p {
+.rf-edt-cnt {
overflow: hidden;
}
-.rf-edt-fp {
+.rf-edt-ftr-cnt {
overflow-x: auto;
overflow-y: visible;
}
-.rf-edt-rsh {
+.rf-edt-rsz-cntr {
left : 0px;
position: relative;
height: 0px;
}
-.rf-edt-rs {
+.rf-edt-rsz {
background-image: url("#{resource['spacer.gif']}");
cursor: e-resize;
height: 20px; /*TODO*/
@@ -78,7 +78,7 @@
width: 6px;
}
-.rf-edt-d {
+.rf-edt-rsz-mkr {
cursor: e-resize;
position: absolute;
border-left: '1px dotted #{richSkin.generalTextColor}';
@@ -87,13 +87,13 @@
display: none;
}
-.rf-edt-ro {
+.rf-edt-rord {
position: absolute;
border-collapse: collapse;
display: none;
}
-.rf-edt-ro th {
+.rf-edt-rord th {
width: 20px;
height: 5px;
font-size: 1px;
@@ -101,7 +101,7 @@
border: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
-.rf-edt-ro td {
+.rf-edt-rord td {
width: 20px;
height: 5px;
font-size: 1px;
@@ -109,39 +109,39 @@
border: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
-.rf-edt-c, .rf-edt-hc, .rf-edt-fc {
+.rf-edt-c, .rf-edt-hdr-c, .rf-edt-ftr-c {
height: 20px;
overflow: hidden;
border-bottom: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
border-right: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
-.rf-edt-efc {
+.rf-edt-ftr-c-emp {
border-right: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
height: 1px;
}
-.rf-edt-cc, .rf-edt-hcc, .rf-edt-fcc, .rf-edt-th, .rf-edt-tf {
+.rf-edt-c-cnt, .rf-edt-hdr-c-cnt, .rf-edt-ftr-c-cnt, .rf-edt-tbl-hdr, .rf-edt-tbl-ftr {
padding: 3px 7px;
white-space: nowrap;
font-family: '#{richSkin.generalFamilyFont}';
font-size: '#{richSkin.generalSizeFont}';
}
-.rf-edt-hcc, .rf-edt-th, .rf-edt-fcc, .rf-edt-tf {
+.rf-edt-hdr-c-cnt, .rf-edt-tbl-hdr, .rf-edt-ftr-c-cnt, .rf-edt-tbl-ftr {
font-weight: bold;
text-align: center;
}
-.rf-edt-hcc, .rf-edt-th {
+.rf-edt-hdr-c-cnt, .rf-edt-tbl-hdr {
color: '#{richSkin.tableHeaderTextColor}';
}
-.rf-edt-cc, .rf-edt-fcc, .rf-edt-tf {
+.rf-edt-c-cnt, .rf-edt-ftr-c-cnt, .rf-edt-tbl-ftr {
color: '#{richSkin.generalTextColor}';
}
-.rf-edt-rom {
+.rf-edt-rord-mkr {
position: absolute;
height: 9px;
font-size: 9px;
@@ -150,10 +150,10 @@
display: none;
}
-.rf-edt-r-s {
+.rf-edt-r-sel {
background-color: '#{richSkin.additionalBackgroundColor}'; /*TODO Probably use other skin property.*/
}
-.rf-edt-r-a {
+.rf-edt-r-act {
font-weight: bold; /*TODO Probably use other property.*/
}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-09-22 17:06:22 UTC (rev 19318)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-09-22 18:22:03 UTC (rev 19319)
@@ -122,7 +122,7 @@
};
richfaces.ExtendedDataTable = function(id, rowCount, ajaxFunction, options) {
- var WIDTH_CLASS_NAME_BASE = "rf-edt-cw-";
+ var WIDTH_CLASS_NAME_BASE = "rf-edt-c-";
var MIN_WIDTH = 20;
options = options || {};
@@ -135,9 +135,9 @@
var reorderMarkerElement = document.getElementById(id + ":rm");
var widthInput = document.getElementById(id + ":wi");
var selectionInput = document.getElementById(id + ":si");
- var normalPartStyle = richfaces.utils.getCSSRule(".rf-edt-pw").style;
- var header = jQuery(element).children(".rf-edt-h");
- var resizerHolders = header.find(".rf-edt-rsh");
+ var normalPartStyle = richfaces.utils.getCSSRule(".rf-edt-cnt, .rf-edt-ftr-cnt").style;
+ var header = jQuery(element).children(".rf-edt-hdr");
+ var resizerHolders = header.find(".rf-edt-rsz-cntr");
var frozenHeaderPartElement = document.getElementById(id + ":frozenHeader");
var frozenColumnCount = frozenHeaderPartElement ? frozenHeaderPartElement.firstChild.rows[0].cells.length : 0;//TODO Richfaces.firstDescendant;
@@ -265,7 +265,7 @@
spacerElement = null;
dataTableElement = null;
}
- parts = jQuery(element).find(".rf-edt-p");
+ parts = jQuery(element).find(".rf-edt-cnt, .rf-edt-ftr-cnt");
updateLayout();
updateScrollPosition(); //TODO Restore horizontal scroll position
};
@@ -319,7 +319,7 @@
var beginReorder = function(event) {
idOfReorderingColumn = this.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
jQuery(document).bind("mousemove", reorder);
- header.find(".rf-edt-hc").bind("mouseover", overReorder);
+ header.find(".rf-edt-hdr-c").bind("mouseover", overReorder);
jQuery(document).one("mouseup", cancelReorder);
return false;
};
@@ -345,7 +345,7 @@
jQuery(this).unbind("mouseout", outReorder);
var id = this.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
var colunmsOrder = "";
- header.find(".rf-edt-hc").each(function() {
+ header.find(".rf-edt-hdr-c").each(function() {
var i = this.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
if (i == id) {
colunmsOrder += idOfReorderingColumn + "," + id + ",";
@@ -358,7 +358,7 @@
var cancelReorder = function(event) {
jQuery(document).unbind("mousemove", reorder);
- header.find(".rf-edt-hc").unbind("mouseover", overReorder);
+ header.find(".rf-edt-hdr-c").unbind("mouseover", overReorder);
reorderElement.style.display = "none";
};
@@ -395,34 +395,34 @@
var selectRow = function(index) {
ranges.add(index);
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[index]).addClass("rf-edt-r-s");
+ jQuery(tbodies[i].rows[index]).addClass("rf-edt-r-sel");
}
}
var deselectRow = function (index) {
ranges.remove(index);
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[index]).removeClass("rf-edt-r-s");
+ jQuery(tbodies[i].rows[index]).removeClass("rf-edt-r-sel");
}
}
var setActiveRow = function (index) {
if(typeof activeIndex == "number") {
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[activeIndex]).removeClass("rf-edt-r-a");
+ jQuery(tbodies[i].rows[activeIndex]).removeClass("rf-edt-r-act");
}
}
activeIndex = index;
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[activeIndex]).addClass("rf-edt-r-a");
+ jQuery(tbodies[i].rows[activeIndex]).addClass("rf-edt-r-act");
}
}
var resetShiftRow = function () {
if(typeof shiftIndex == "number") {
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[shiftIndex]).removeClass("rf-edt-r-t");
+ jQuery(tbodies[i].rows[shiftIndex]).removeClass("rf-edt-r-sht");
}
}
@@ -434,7 +434,7 @@
shiftIndex = index;
if(typeof index == "number") {
for ( var i = 0; i < tbodies.length; i++) {
- jQuery(tbodies[i].rows[shiftIndex]).addClass("rf-edt-r-t");
+ jQuery(tbodies[i].rows[shiftIndex]).addClass("rf-edt-r-sht");
}
}
}
@@ -448,13 +448,13 @@
var rows = tbodies[0].rows;
for (var i = 0; i < rows.length; i++) {
var row = jQuery(rows[i]);
- if (row.hasClass("rf-edt-r-s")) {
+ if (row.hasClass("rf-edt-r-sel")) {
ranges.add(row[0].rowIndex)
}
- if (row.hasClass("rf-edt-r-a")) {
+ if (row.hasClass("rf-edt-r-act")) {
activeIndex = row[0].rowIndex;
}
- if (row.hasClass("rf-edt-r-t")) {
+ if (row.hasClass("rf-edt-r-sht")) {
shiftIndex = row[0].rowIndex;
}
}
@@ -616,8 +616,8 @@
jQuery(window).bind("resize", updateLayout);
jQuery(scrollElement).bind("scroll", updateScrollPosition);
var bindHeaderHandlers = function () {
- header.find(".rf-edt-rs").bind("mousedown", beginResize);
- header.find(".rf-edt-hc").bind("mousedown", beginReorder);
+ header.find(".rf-edt-rsz").bind("mousedown", beginResize);
+ header.find(".rf-edt-hdr-c").bind("mousedown", beginReorder);
}
bindHeaderHandlers();
jQuery(element).bind("rich:onajaxcomplete", ajaxComplete);
@@ -628,7 +628,7 @@
this.getColumnPosition = function(id) {
var position;
- var headers = header.find(".rf-edt-hc");
+ var headers = header.find(".rf-edt-hdr-c");
for (var i = 0; i < headers.length; i++) {
if (id == headers[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1]) {
position = i;
@@ -640,7 +640,7 @@
this.setColumnPosition = function(id, position) {
var colunmsOrder = "";
var before;
- var headers = header.find(".rf-edt-hc");
+ var headers = header.find(".rf-edt-hdr-c");
for (var i = 0; i < headers.length; i++) {
var current = headers[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
if (i == position) {
Modified: trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
===================================================================
--- trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-09-22 17:06:22 UTC (rev 19318)
+++ trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-09-22 18:22:03 UTC (rev 19319)
@@ -121,36 +121,36 @@
HtmlPage page = environment.getPage("/extendedDataTableTest.jsf");
HtmlElement table = page.getElementById("table");
String text = table.getElementsByTagName("style").get(0).getTextContent();
- assertTrue(text.contains("rf-edt-pw"));
- assertTrue(text.contains("rf-edt-cw"));
- HtmlElement header = table.getFirstByXPath("div[@class='rf-edt-h']");
+ assertTrue(text.contains(".rf-edt-cnt, .rf-edt-ftr-cnt"));
+ assertTrue(text.contains("rf-edt-c"));
+ HtmlElement header = table.getFirstByXPath("div[@class='rf-edt-hdr']");
HtmlElement frozenHeader = header.getElementById("table:frozenHeader");
HtmlElement normalHeader = header.getElementById("table:header");
- assertTrue(normalHeader.getAttribute("class").contains("rf-edt-pw"));
- assertNotNull(frozenHeader.getFirstByXPath("descendant::*[@class='rf-edt-rs']"));
- assertNotNull(normalHeader.getFirstByXPath("descendant::*[@class='rf-edt-rs']"));
+ assertTrue(normalHeader.getAttribute("class").contains("rf-edt-cnt"));
+ assertNotNull(frozenHeader.getFirstByXPath("descendant::*[@class='rf-edt-rsz']"));
+ assertNotNull(normalHeader.getFirstByXPath("descendant::*[@class='rf-edt-rsz']"));
assertEquals("headerColumnFacet1", ((HtmlElement) frozenHeader
- .getFirstByXPath("//*[@class='rf-edt-hcc']//*[@id='table:headerColumnFacet1']"))
+ .getFirstByXPath("//*[@class='rf-edt-hdr-c-cnt']//*[@id='table:headerColumnFacet1']"))
.getTextContent());
assertEquals("headerColumnFacet2", ((HtmlElement) normalHeader
- .getFirstByXPath("//*[@class='rf-edt-hcc']//*[@id='table:headerColumnFacet2']"))
+ .getFirstByXPath("//*[@class='rf-edt-hdr-c-cnt']//*[@id='table:headerColumnFacet2']"))
.getTextContent());
HtmlElement body = table.getElementById("table:b");
assertEquals("rf-edt-b", body.getAttribute("class"));
- assertNotNull(body.getFirstByXPath("descendant::*[@class='rf-edt-s']"));
+ assertNotNull(body.getFirstByXPath("descendant::*[@class='rf-edt-spcr']"));
assertNotNull(body
- .getFirstByXPath("descendant::*[@class='rf-edt-p rf-edt-pw']//*[@id='table:tbn']"));
+ .getFirstByXPath("descendant::*[@class='rf-edt-cnt']//*[@id='table:tbn']"));
assertEquals("noDataFacet", ((HtmlElement) page
.getFirstByXPath("//*[@id='table2']//*[@id='table2:b']//*[@id='table2:noDataFacet']")).getTextContent());
- HtmlElement footer = table.getFirstByXPath("div[@class='rf-edt-f']");
- HtmlElement frozenFooter = footer.getFirstByXPath("descendant::*[@class='rf-edt-fa']/div");
+ HtmlElement footer = table.getFirstByXPath("div[@class='rf-edt-ftr']");
+ HtmlElement frozenFooter = footer.getFirstByXPath("descendant::*[@class='rf-edt-ftr-fzn']/div");
HtmlElement normalFooter = footer.getElementById("table:footer");
- assertTrue(normalFooter.getAttribute("class").contains("rf-edt-pw"));
+ assertTrue(normalFooter.getAttribute("class").contains("rf-edt-ftr-cnt"));
assertEquals("footerColumnFacet1", ((HtmlElement) frozenFooter
- .getFirstByXPath("descendant::*[@class='rf-edt-fcc']//*[@id='table:footerColumnFacet1']"))
+ .getFirstByXPath("descendant::*[@class='rf-edt-ftr-c-cnt']//*[@id='table:footerColumnFacet1']"))
.getTextContent());
assertEquals("footerColumnFacet2", ((HtmlElement) normalFooter
- .getFirstByXPath("descendant::*[@class='rf-edt-fcc']//*[@id='table:footerColumnFacet2']"))
+ .getFirstByXPath("descendant::*[@class='rf-edt-ftr-c-cnt']//*[@id='table:footerColumnFacet2']"))
.getTextContent());
}
@@ -166,9 +166,9 @@
HtmlPage page = environment.getPage("/extendedDataTableTest.jsf");
HtmlElement table = page.getElementById("table");
assertEquals("footerFacet", table.getElementById("table:footerFacet").getTextContent());
- assertEquals("rf-edt-d", table.getElementById("table:d").getAttribute("class"));
- assertEquals("rf-edt-ro", table.getElementById("table:r").getAttribute("class"));
- assertEquals("rf-edt-rom", table.getElementById("table:rm").getAttribute("class"));
+ assertEquals("rf-edt-rsz-mkr", table.getElementById("table:d").getAttribute("class"));
+ assertEquals("rf-edt-rord", table.getElementById("table:r").getAttribute("class"));
+ assertEquals("rf-edt-rord-mkr", table.getElementById("table:rm").getAttribute("class"));
assertEquals("table:wi", table.getElementById("table:wi").getAttribute("name"));
assertTrue(table.getElementsByTagName("script").get(0).getTextContent()
.contains("RichFaces.ExtendedDataTable"));
@@ -187,7 +187,7 @@
HtmlElement cell = table.getElementById("table:0:f").getElementsByTagName("div").get(0);
assertTrue(cell.getAttribute("class").contains("rf-edt-c"));
HtmlElement cellContent = cell.getElementsByTagName("div").get(0);
- assertEquals("rf-edt-cc", cellContent.getAttribute("class"));
+ assertEquals("rf-edt-c-cnt", cellContent.getAttribute("class"));
assertEquals("value", cellContent.getElementById("table:0:outputText").getTextContent());
}
14 years, 3 months
JBoss Rich Faces SVN: r19318 - in trunk/ui/output/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-09-22 13:06:22 -0400 (Wed, 22 Sep 2010)
New Revision: 19318
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss
trunk/ui/output/ui/src/main/templates/progressBar.template.xml
Log:
Fix styles for progressbar
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-09-22 14:57:41 UTC (rev 19317)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-09-22 17:06:22 UTC (rev 19318)
@@ -278,8 +278,8 @@
}
public String getShellStyle(FacesContext context, UIComponent component){
- return (!isSimpleMarkup(component)) ? "rich-progress-bar-shell-dig "
- : "rich-progress-bar-shell ";
+ return (!isSimpleMarkup(component)) ? "rf-pb-shl-dig "
+ : "rf-pb-shl ";
}
public String getWidth(UIComponent component){
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss 2010-09-22 14:57:41 UTC (rev 19317)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss 2010-09-22 17:06:22 UTC (rev 19318)
@@ -1,36 +1,44 @@
-.rich-progress-bar-height{height : 13px;}
-.rich-progress-bar-width{width : 200px}
-.rich-progress-bar-block{white-space : nowrap;}
-.rich-progress-bar-uploaded{
+.rf-pb-cnt{
+height : 13px;
+white-space : nowrap;
+width : 200px;
+}
+.rf-pb-upl{
background-repeat : repeat-x;
background-image : "url(#{resource['org.richfaces.renderkit.html.images.ProgressBarAnimatedBg']})";
background-color : '#{richSkin.selectControlColor}';
+height : 13px;
}
-.rich-progress-bar-uploaded-dig{
+.rf-pb-upl-dig{
overflow : hidden; position : absolute; top : 0px; left : 0px;
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-progress-bar-shell{
+.rf-pb-shl{
margin-bottom : 2px; border : 1px solid;
background-color : '#{richSkin.controlBackgroundColor}';
border-color : '#{richSkin.panelBorderColor}';
}
-.rich-progress-bar-shell-dig{
+.rf-pb-shl-dig{
position : relative; margin-bottom : 2px; border : 1px solid; overflow: hidden;
border-color : '#{richSkin.panelBorderColor}';
color : '#{richSkin.controlTextColor}';
font-family : '#{richSkin.generalFamilyFont}';
font-size : '#{richSkin.generalSizeFont}';
}
-.rich-progress-bar-remained{
+.rf-pb-rmnd{
text-align : center; font-weight : bold; position : relative;
background-color : '#{richSkin.controlBackgroundColor}';
text-color : '#{richSkin.controlTextColor}';
+height : 13px;
+width : 200px;
+padding: 0px;
}
-.rich-progress-bar-completed{
+.rf-pb-cmpltd{
text-align : center; font-weight : bold; background-repeat : repeat-x;
background-color : '#{richSkin.selectControlColor}';
text-color : '#{richSkin.controlBackgroundColor}';
+height : 13px;
+width : 200px;
+padding: 0px;
background-image : "url(#{resource['org.richfaces.renderkit.html.images.ProgressBarAnimatedBg']})";
}
-.rich-progress-bar-padding{padding: 0px}
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/templates/progressBar.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2010-09-22 14:57:41 UTC (rev 19317)
+++ trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2010-09-22 17:06:22 UTC (rev 19318)
@@ -30,15 +30,15 @@
</c:if>
<c:if test="#{state eq 'progressState'}">
<cdk:object type="java.lang.String" name="shellStyle" value="#{getShellStyle(facesContext, component)}" />
- <div cdk:passThroughWithExclusions="onclick, ondblclick, onmouseup, onmousedown, onmousemove, onmouseover, onmouseout" id="#{clientId}" class="rich-progress-bar-block rich-progress-bar-width #{shellStyle} #{component.attributes['styleClass']}" style="#{component.attributes['style']}">
+ <div cdk:passThroughWithExclusions="onclick, ondblclick, onmouseup, onmousedown, onmousemove, onmouseover, onmouseout" id="#{clientId}" class="rf-pb-cnt #{shellStyle} #{component.attributes['styleClass']}" style="#{component.attributes['style']}">
<c:if test="#{!isSimpleMarkup(component)}">
- <div class="rich-progress-bar-width rich-progress-bar-height rich-progress-bar-remained rich-progress-bar-padding #{component.attributes['remainClass']}" id="#{clientId}:remain" style="#{component.attributes['style']}"/>
- <div class="rich-progress-bar-uploaded-dig" id="#{clientId}:upload" style="#{component.attributes['style']}; width:#{getWidth(component)}%;">
- <div class="rich-progress-bar-height rich-progress-bar-width rich-progress-bar-completed rich-progress-bar-padding #{component.attributes['completeClass']}" id="#{clientId}:complete" style="#{component.attributes['style']}"/>
+ <div class="rf-pb-rmnd #{component.attributes['remainClass']}" id="#{clientId}:remain" style="#{component.attributes['style']}"/>
+ <div class="rf-pb-upl-dig" id="#{clientId}:upload" style="#{component.attributes['style']}; width:#{getWidth(component)}%;">
+ <div class="rf-pb-cmpltd #{component.attributes['completeClass']}" id="#{clientId}:complete" style="#{component.attributes['style']}"/>
</div>
</c:if>
<c:if test="#{isSimpleMarkup(component)}">
- <div class="rich-progress-bar-height rich-progress-bar-uploaded #{component.attributes['completeClass']}" id="#{clientId}:upload" style="#{component.attributes['style']}; width:#{getWidth(component)}%;"/>
+ <div class="rf-pb-upl #{component.attributes['completeClass']}" id="#{clientId}:upload" style="#{component.attributes['style']}; width:#{getWidth(component)}%;"/>
</c:if>
<script type="text/javascript">
#{getInitialScript(facesContext, component, 'progressState')}
@@ -54,15 +54,15 @@
<cdk:call expression="renderInitialFacet(facesContext, component)"/>
</div>
<cdk:object type="java.lang.String" name="shellStyle" value="#{getShellStyle(facesContext, component)}" />
- <div cdk:passThroughWithExclusions="onclick, ondblclick, onmouseup, onmousedown, onmousemove, onmouseover, onmouseout" id="#{clientId}:progressState" class="rich-progress-bar-block rich-progress-bar-height rich-progress-bar-width #{shellStyle} #{component.attributes['styleClass']}" style="#{component.attributes['style']} display:none;">
+ <div cdk:passThroughWithExclusions="onclick, ondblclick, onmouseup, onmousedown, onmousemove, onmouseover, onmouseout" id="#{clientId}:progressState" class="rf-pb-cnt #{shellStyle} #{component.attributes['styleClass']}" style="#{component.attributes['style']} display:none;">
<c:if test="#{!isSimpleMarkup(component)}">
- <div class="rich-progress-bar-width rich-progress-bar-remained rich-progress-bar-padding #{component.attributes['remainClass']}" id="#{clientId}:remain" style="#{component.attributes['style']}"/>
- <div class="rich-progress-bar-uploaded-dig" id="#{clientId}:upload" style="#{component.attributes['style']}; width=#{getWidth(component)}%;">
- <div class="rich-progress-bar-height rich-progress-bar-width rich-progress-bar-completed rich-progress-bar-padding #{component.attributes['completeClass']}" id="#{clientId}:complete" style="#{component.attributes['style']}"/>
+ <div class="rf-pb-rmnd #{component.attributes['remainClass']}" id="#{clientId}:remain" style="#{component.attributes['style']}"/>
+ <div class="rf-pb-upl-dig" id="#{clientId}:upload" style="#{component.attributes['style']}; width=#{getWidth(component)}%;">
+ <div class="rf-pb-cmpltd #{component.attributes['completeClass']}" id="#{clientId}:complete" style="#{component.attributes['style']}"/>
</div>
</c:if>
<c:if test="#{isSimpleMarkup(component)}">
- <div class="rich-progress-bar-height rich-progress-bar-uploaded #{component.attributes['completeClass']}" id="#{clientId}:upload" style="#{component.attributes['style']}; width=#{getWidth(component)}%;"/>
+ <div class="rf-pb-upl #{component.attributes['completeClass']}" id="#{clientId}:upload" style="#{component.attributes['style']}; width=#{getWidth(component)}%;"/>
</c:if>
</div>
<div id="#{clientId}:completeState" class="#{component.attributes['finishClass']}" style="#{component.attributes['style']} display:none;">
14 years, 3 months
JBoss Rich Faces SVN: r19317 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-22 10:57:41 -0400 (Wed, 22 Sep 2010)
New Revision: 19317
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
Log:
https://jira.jboss.org/browse/RFPL-817
* added tests for h:inputText, h:inputSecret and h:inputTextarea with a4j:ajax
* removed unnecessary imports in TestHInputText
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2010-09-22 14:52:51 UTC (rev 19316)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2010-09-22 14:57:41 UTC (rev 19317)
@@ -23,17 +23,13 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
-import java.net.URL;
-
import javax.faces.event.PhaseId;
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.testng.annotations.Test;
/**
* Abstract test case for testing h:commandButton and h:commandLink with a4j:ajax.
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2010-09-22 14:57:41 UTC (rev 19317)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.testng.Assert.assertEquals;
+
+import javax.faces.event.PhaseId;
+import org.jboss.test.selenium.dom.Event;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+
+/**
+ * Abstract test case for testing h:inputText, h:inputSecret and h:inputTextarea with a4j:ajax.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public abstract class AbstractTestTextInput extends AbstractMetamerTest {
+
+ private JQueryLocator output1 = pjq("div[id$=output1]");
+ private JQueryLocator output2 = pjq("div[id$=output2]");
+
+ private void typeToInput(JQueryLocator input, String text) {
+ for (char c : text.toCharArray()) {
+ selenium.keyPress(input, String.valueOf(c));
+ guardXhr(selenium).fireEvent(input, Event.KEYUP);
+ }
+ }
+
+ public void testType(JQueryLocator input, String text) {
+ typeToInput(input, text);
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, text, "Wrong output1");
+ assertEquals(selenium.getText(output2), text, "Wrong output2");
+ }
+
+ public void testBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testData(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4 data");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4 data", "Data sent with ajax request");
+ }
+
+ public void testImmediate(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "RichFaces 4", "Output should change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ PhaseId.UPDATE_MODEL_VALUES, PhaseId.INVOKE_APPLICATION, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testImmediateBypassUpdates(JQueryLocator input) {
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ selenium.click(pjq("input[type=checkbox][id$=bypassUpdatesInput]"));
+ selenium.waitForPageToLoad();
+ selenium.click(pjq("input[type=checkbox][id$=immediateInput]"));
+ selenium.waitForPageToLoad();
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange(timeValue, retrieveText.locator(time));
+
+ assertEquals(selenium.getText(output1), "", "Output should not change");
+ assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ }
+
+ public void testLimitRender(JQueryLocator input) {
+ selenium.click(pjq("input[type=checkbox][id$=limitRenderInput]"));
+ selenium.waitForPageToLoad();
+
+ JQueryLocator time = jq("span[id$=requestTime]");
+ String timeValue = selenium.getText(time);
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ assertEquals(selenium.getText(time), timeValue, "Ajax-rendered a4j:outputPanel shouldn't change");
+ }
+
+ public void testEvents(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ typeToInput(input, "RichFaces 4");
+ waitGui.failWith("Page was not updated").waitForChange("", retrieveText.locator(output1));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ public void testRender(JQueryLocator input) {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "output1");
+ selenium.waitForPageToLoad();
+
+ typeToInput(input, "RichFaces 4");
+ String outputValue = waitGui.failWith("Page was not updated").waitForChangeAndReturn("",
+ retrieveText.locator(output1));
+
+ assertEquals(outputValue, "RichFaces 4", "Wrong output1");
+ assertEquals(selenium.getText(output2), "", "Wrong output2");
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java 2010-09-22 14:57:41 UTC (rev 19317)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hInputSecret.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHInputSecret extends AbstractTestTextInput {
+
+ private JQueryLocator input = pjq("input[type=password][id$=input]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hInputSecret.xhtml");
+ }
+
+ @Test
+ public void testSimpleType() {
+ super.testType(input, "RichFaces 4");
+ }
+
+ @Test
+ public void testSimpleTypeUnicode() {
+ super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputSecret.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java 2010-09-22 14:57:41 UTC (rev 19317)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hInputText.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHInputText extends AbstractTestTextInput {
+
+ private JQueryLocator input = pjq("input[type=text][id$=input]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hInputText.xhtml");
+ }
+
+ @Test
+ public void testSimpleType() {
+ super.testType(input, "RichFaces 4");
+ }
+
+ @Test
+ public void testSimpleTypeUnicode() {
+ super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputText.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java 2010-09-22 14:57:41 UTC (rev 19317)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.a4jAjax;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import org.jboss.test.selenium.locator.JQueryLocator;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/a4jAjax/hInputTextarea.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestHInputTextarea extends AbstractTestTextInput {
+
+ private JQueryLocator input = pjq("textarea[id$=input]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/a4jAjax/hInputTextarea.xhtml");
+ }
+
+ @Test
+ public void testSimpleType() {
+ super.testType(input, "RichFaces 4");
+ }
+
+ @Test
+ public void testSimpleTypeUnicode() {
+ super.testType(input, "ľščťžýáíéúôň фывацукйешгщь");
+ }
+
+ @Test
+ public void testBypassUpdates() {
+ super.testBypassUpdates(input);
+ }
+
+ @Test
+ public void testData() {
+ super.testData(input);
+ }
+
+ @Test
+ public void testImmediate() {
+ super.testImmediate(input);
+ }
+
+ @Test
+ public void testImmediateBypassUpdates() {
+ super.testImmediateBypassUpdates(input);
+ }
+
+ @Test
+ public void testLimitRender() {
+ super.testLimitRender(input);
+ }
+
+ @Test
+ public void testEvents() {
+ super.testEvents(input);
+ }
+
+ @Test
+ public void testRender() {
+ super.testRender(input);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/TestHInputTextarea.java
___________________________________________________________________
Name: svn:keywords
+ Revision
14 years, 3 months
JBoss Rich Faces SVN: r19316 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-22 10:52:51 -0400 (Wed, 22 Sep 2010)
New Revision: 19316
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml
Log:
* outputs refactored not to contain unnecessary text
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectBooleanCheckbox.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -61,11 +61,14 @@
<br/>
+ Your selection:
<a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.boolVal}
+ #{a4jAjaxBean.boolVal}
</a4j:outputPanel>
+ <br/>
+ Your selection:
<a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.boolVal}
+ #{a4jAjaxBean.boolVal}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyCheckbox.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -68,11 +68,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyListbox.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -67,11 +67,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectManyMenu.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -67,11 +67,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.cars}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.cars}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneListbox.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -45,7 +45,7 @@
<f:selectItem itemValue="Mercedes"/>
<f:selectItem itemValue="Ferrari"/>
<f:selectItem itemValue="Lexus"/>
-
+
<a4j:ajax id="a4jAjax" bypassUpdates="#{a4jAjaxBean.attributes['bypassUpdates'].value}"
data="#{a4jAjaxBean.attributes['data'].value}"
disabled="#{a4jAjaxBean.attributes['disabled'].value}"
@@ -66,11 +66,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneMenu.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -67,11 +67,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml 2010-09-22 13:22:14 UTC (rev 19315)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hSelectOneRadio.xhtml 2010-09-22 14:52:51 UTC (rev 19316)
@@ -67,11 +67,14 @@
<br/>
- <a4j:outputPanel id="output1" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ Your selection:
+ <a4j:outputPanel id="output1">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
- <a4j:outputPanel id="output2" layout="block">
- Your selection: #{a4jAjaxBean.car}
+ <br/>
+ Your selection:
+ <a4j:outputPanel id="output2">
+ #{a4jAjaxBean.car}
</a4j:outputPanel>
</ui:define>
14 years, 3 months