JBoss Rich Faces SVN: r15429 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: resources/org/jboss/richfaces/integrationTest/commandButton and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-02 02:46:44 -0400 (Wed, 02 Sep 2009)
New Revision: 15429
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/commandButton/CommandButtonTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/messages.properties
Log:
- refactored Command Button test cases to follow conventions
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/commandButton/CommandButtonTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/commandButton/CommandButtonTestCase.java 2009-09-02 06:25:05 UTC (rev 15428)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/commandButton/CommandButtonTestCase.java 2009-09-02 06:46:44 UTC (rev 15429)
@@ -1,8 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This code is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This code 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 test suite; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.jboss.richfaces.integrationTest.commandButton;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
-import org.jboss.test.selenium.waiting.Wait;
-import org.testng.Assert;
+import org.jboss.test.selenium.waiting.*;
+
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
@@ -10,57 +31,66 @@
* @version $Revision$
*/
public class CommandButtonTestCase extends AbstractSeleniumRichfacesTestCase {
+ private final String LOC_INPUT_TEXT = getLoc("INPUT_TEXT");
+ private final String LOC_OUTPUT_TEXT = getLoc("OUTPUT_TEXT");
+ private final String LOC_BUTTON_SAY_HELLO = getLoc("BUTTON_SAY_HELLO");
+
+ private final String MSG_INPUT_NON_EMPTY = getMsg("INPUT_NON_EMPTY");
+ private final String MSG_OUTPUT_TEXT_PREFORMATTED = getMsg("OUTPUT_TEXT_PREFORMATTED");
+
/**
- * Opens specified page
+ * Test that after non-empty input will be shown hello message.
*/
- private void openPage() {
- selenium.open(contextPath
- + "/richfaces/commandButton.jsf?c=commandButton&tab=usage");
- }
-
- private String textInput = getLoc("ajax-support--input");
- private String textOutput = formatLoc("command-button--text", 2);
- private String helloOutput = formatLoc("command-button--text", 1);
- private String exclamationOutput = formatLoc("command-button--text", 3);
- private String hello = formatMess("command-button--hello");
- private String exclamation = formatMess("command-button--exclamation");
- private String commandButton = getLoc("command-button--button");
- private String nonEmpty = getMess("ajax-support--non-empty");
-
@Test
public void testNonEmpty() {
- openPage();
nonEmpty();
}
+ /**
+ * Test that after empty input will not shown any message.
+ */
@Test
public void testEmpty() {
- openPage();
empty();
}
+ /**
+ * Test that after switching between empty and non-empty input is hello
+ * message shown only if input is non-empty.
+ */
@Test
public void testInterleaving() {
- openPage();
nonEmpty();
empty();
nonEmpty();
empty();
}
- public void nonEmpty() {
- selenium.type(textInput, nonEmpty);
- selenium.click(commandButton);
+ private void nonEmpty() {
+ final String expectedOutputText = format(MSG_OUTPUT_TEXT_PREFORMATTED, MSG_INPUT_NON_EMPTY);
+
+ selenium.type(LOC_INPUT_TEXT, MSG_INPUT_NON_EMPTY);
+ selenium.click(LOC_BUTTON_SAY_HELLO);
+
waitFor(Wait.DEFAULT_INTERVAL);
- waitForTextEquals(textOutput, nonEmpty);
- Assert.assertEquals(selenium.getText(helloOutput), hello);
- Assert.assertEquals(selenium.getText(exclamationOutput), exclamation);
+ waitForTextEquals(LOC_OUTPUT_TEXT, expectedOutputText);
}
- public void empty() {
- selenium.type(textInput, "");
- selenium.click(commandButton);
+ private void empty() {
+ final String expectedOutputText = "";
+
+ selenium.type(LOC_INPUT_TEXT, "");
+ selenium.click(LOC_BUTTON_SAY_HELLO);
+
waitFor(Wait.DEFAULT_INTERVAL);
- Assert.assertFalse(selenium.isElementPresent(textOutput));
+ waitForTextEquals(LOC_OUTPUT_TEXT, expectedOutputText);
}
+
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Command Button");
+
+ scrollIntoView(LOC_BUTTON_SAY_HELLO, true);
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/locators.properties 2009-09-02 06:25:05 UTC (rev 15428)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/locators.properties 2009-09-02 06:46:44 UTC (rev 15429)
@@ -1,3 +1,3 @@
-ajax-support--input=//input[@type\='text']
-command-button--button=//input[@type\='button']
-command-button--text=//*[@id\='out']/*[{0}]/text()
+INPUT_TEXT=//input[@type\='text']
+BUTTON_SAY_HELLO=//input[@type\='button']
+OUTPUT_TEXT=//*[@id\='out']
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/messages.properties 2009-09-02 06:25:05 UTC (rev 15428)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/commandButton/messages.properties 2009-09-02 06:46:44 UTC (rev 15429)
@@ -1,3 +1,2 @@
-ajax-support--non-empty=abc
-command-button--hello=Hello
-command-button--exclamation=\!
+INPUT_NON_EMPTY=abc
+OUTPUT_TEXT_PREFORMATTED=Hello {0}\!
13 years, 6 months
JBoss Rich Faces SVN: r15428 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: resources/org/jboss/richfaces/integrationTest/ajaxSupport and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-02 02:25:05 -0400 (Wed, 02 Sep 2009)
New Revision: 15428
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/messages.properties
Log:
- refactored Ajax Support test cases to follow conventions
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java 2009-09-02 06:12:16 UTC (rev 15427)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxSupport/AjaxSupportTestCase.java 2009-09-02 06:25:05 UTC (rev 15428)
@@ -1,7 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This code is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This code 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 test suite; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.jboss.richfaces.integrationTest.ajaxSupport;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
+import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.waiting.Wait;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
@@ -9,35 +31,33 @@
* @version $Revision$
*/
public class AjaxSupportTestCase extends AbstractSeleniumRichfacesTestCase {
+ private String LOC_INPUT_TEXT = getLoc("INPUT_TEXT");
+ private String LOC_OUTPUT_TEXT_RELATIVE = formatLoc("OUTPUT_TEXT_RELATIVE", LOC_INPUT_TEXT);
+
+ private String MSG_INPUT_NON_EMPTY = getMsg("INPUT_NON_EMPTY");
+
/**
- * Opens specified page
+ * Try non-empty input. Input should appear in output.
*/
- private void openPage() {
- selenium.open(contextPath
- + "/richfaces/support.jsf?c=support&tab=usage");
- }
-
- private String textInput = getLoc("ajax-support--input");
- private String relativeText = formatLoc("ajax-support--text-relative",
- textInput);
- private String nonEmpty = getMess("ajax-support--non-empty");
- private String inputEvent = getMess("ajax-support--input-event");
-
@Test
public void testNonEmpty() {
- openPage();
nonEmpty();
}
+ /**
+ * Try empty input. No output should appear.
+ */
@Test
public void testEmpty() {
- openPage();
empty();
}
+ /**
+ * Test interleaving of typing empty and non-empty input and watch output to
+ * be changed in right way.
+ */
@Test
public void testInterleaving() {
- openPage();
nonEmpty();
empty();
nonEmpty();
@@ -45,16 +65,26 @@
}
public void nonEmpty() {
- selenium.type(textInput, nonEmpty);
- selenium.fireEvent(textInput, inputEvent);
+ selenium.type(LOC_INPUT_TEXT, MSG_INPUT_NON_EMPTY);
+ selenium.fireEvent(LOC_INPUT_TEXT, Event.KEYUP);
+
waitFor(Wait.DEFAULT_INTERVAL);
- waitForTextEquals(relativeText, nonEmpty);
+ waitForTextEquals(LOC_OUTPUT_TEXT_RELATIVE, MSG_INPUT_NON_EMPTY);
}
public void empty() {
- selenium.type(textInput, "");
- selenium.fireEvent(textInput, inputEvent);
+ selenium.type(LOC_INPUT_TEXT, "");
+ selenium.fireEvent(LOC_INPUT_TEXT, Event.KEYUP);
+
waitFor(Wait.DEFAULT_INTERVAL);
- waitForTextEquals(textInput, "");
+ waitForTextEquals(LOC_INPUT_TEXT, "");
}
+
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Ajax Support");
+
+ scrollIntoView(LOC_INPUT_TEXT, true);
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties 2009-09-02 06:12:16 UTC (rev 15427)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/locators.properties 2009-09-02 06:25:05 UTC (rev 15428)
@@ -1,2 +1,2 @@
-ajax-support--input=//input[@type\='text']
-ajax-support--text-relative={0}/../../td[2]/*/text()
\ No newline at end of file
+INPUT_TEXT=//input[@type\='text']
+OUTPUT_TEXT_RELATIVE={0}/../../td[2]/*/text()
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/messages.properties 2009-09-02 06:12:16 UTC (rev 15427)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxSupport/messages.properties 2009-09-02 06:25:05 UTC (rev 15428)
@@ -1,2 +1 @@
-ajax-support--non-empty=abc
-ajax-support--input-event=keyup
\ No newline at end of file
+INPUT_NON_EMPTY=abc
13 years, 6 months
JBoss Rich Faces SVN: r15427 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: resources/org/jboss/richfaces/integrationTest/ajaxRegion and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-02 02:12:16 -0400 (Wed, 02 Sep 2009)
New Revision: 15427
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/messages.properties
Log:
- refactored Ajax Region test cases to follow conventions
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java 2009-09-01 22:31:02 UTC (rev 15426)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxRegion/AjaxRegionTestCase.java 2009-09-02 06:12:16 UTC (rev 15427)
@@ -1,12 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This code is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This code 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 test suite; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.jboss.richfaces.integrationTest.ajaxRegion;
-import junit.framework.Assert;
+import static org.testng.Assert.*;
import org.apache.commons.lang.StringUtils;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
-import org.jboss.test.selenium.waiting.Condition;
-import org.jboss.test.selenium.waiting.Not;
-import org.jboss.test.selenium.waiting.Wait;
+import org.jboss.test.selenium.dom.Event;
+import org.jboss.test.selenium.waiting.*;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
@@ -14,142 +34,198 @@
* @version $Revision$
*/
public class AjaxRegionTestCase extends AbstractSeleniumRichfacesTestCase {
+ private final String LOC_INPUT_RELATIVE = getLoc("INPUT_RELATIVE");
+ private final String LOC_INPUT_TEST1_NAME1 = format(LOC_INPUT_RELATIVE, 1, 1, 1);
+ private final String LOC_INPUT_TEST1_JOB1 = format(LOC_INPUT_RELATIVE, 1, 1, 2);
+ private final String LOC_INPUT_TEST1_NAME2 = format(LOC_INPUT_RELATIVE, 1, 2, 1);
+ private final String LOC_INPUT_TEST2_NAME1 = format(LOC_INPUT_RELATIVE, 2, 1, 1);
+ private final String LOC_INPUT_TEST2_NAME2 = format(LOC_INPUT_RELATIVE, 2, 2, 1);
+ private final String LOC_OUTPUT_VALIDATION_MESSAGE = getLoc("OUTPUT_VALIDATION_MESSAGE");
+ private final String LOC_OUTPUT_TEST1_TYPED_NAME = getLoc("OUTPUT_TEST1_TYPED_NAME");
+ private final String LOC_OUTPUT_TEST2_TYPED_NAME = getLoc("OUTPUT_TEST2_TYPED_NAME");
+ private final String LOC_OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED = getLoc("OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED");
+ private final String LOC_OUTPUT_TEXT_DISAPPEAR = format(LOC_OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED, 3);
+ private final String LOC_OUTPUT_TEXT_NOT_DISAPPER = format(LOC_OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED, 4);
+
+ private final String MSG_INPUT_SAMPLE = getMsg("INPUT_SAMPLE");
+ private final String MSG_OUTPUT_TYPED_NAME_PREFORMATTED = getMsg("OUTPUT_TYPED_NAME_PREFORMATTED");
+ private final String MSG_MESSAGE_VALUE_REQUIRED = getMsg("MESSAGE_VALUE_REQUIRED");
+
/**
- * Opens specified page
+ * Test1 (group of 4 inputs) - When only first Name input will be changed,
+ * check that validation message appears and Typed name contains no output.
*/
- private void openPage() {
- selenium.open(contextPath + "/richfaces/region.jsf?c=region&tab=usage");
- }
-
- private String input = getMess("ajax-region--input");
- private String firedEvent = getMess("ajax-region--fired-event");
- private String name1 = formatLoc("ajax-region--input", 1, 1, 1);
- private String job1 = formatLoc("ajax-region--input", 1, 1, 2);
- private String name2 = formatLoc("ajax-region--input", 1, 2, 1);
- private String name3 = formatLoc("ajax-region--input", 2, 1, 1);
- private String name4 = formatLoc("ajax-region--input", 2, 2, 1);
- private String messages = getLoc("ajax-region--messages");
- private String outname = formatLoc("ajax-region--typed-name", "");
- private String outname2 = formatLoc("ajax-region--typed-name", "2");
- private String textDisappears = formatLoc("ajax-region--influenced-text", 3);
- private String textNotDisappears = formatLoc("ajax-region--influenced-text", 4);
-
@Test
- public void testName1DontPassValidation() {
- openPage();
- name1DontPassValidation();
+ public void testName1AloneDontPassValidation() {
+ name1AloneDontPassValidation();
}
-
+
+ /**
+ * Test1 (group of 4 inputs) - When name was changed, validation message
+ * appears and typed name wasn't changed, try to input first Job input -
+ * validation message should disappear and typed name should be changed
+ * right.
+ */
@Test
public void testJob1ChangeDontInfluenceName1ValidationError() {
- testName1DontPassValidation();
+ name1AloneDontPassValidation();
job1ChangeInfluenceName1Validation();
}
-
+
+ /**
+ * Test1 (group of 4 inputs) - When job input is not blank, we can change
+ * name input as needed and no validation message should appear and typed
+ * name will change right.
+ */
@Test
public void testName1CanBeChangedAnywayIfJob1IsNotBlank() {
- testJob1ChangeDontInfluenceName1ValidationError();
+ name1AloneDontPassValidation();
+ job1ChangeInfluenceName1Validation();
name1CanBeChangedAnywayIfJob1IsNotBlank();
}
-
+
+ /**
+ * Test1 (group of 4 inputs) - Second column can be changed as needed and no
+ * validation message will appear and typed name will change right.
+ */
@Test
- public void test2CanBeChangedAnyway() {
- openPage();
- trySomeInputs(name2);
+ public void testSecondInputsCanBeChangedAnyway() {
+ tryTypingToInput(LOC_INPUT_TEST1_NAME2);
}
-
+
+ /**
+ * Test types sample into input and checks that text under input will
+ * disappear when region will rerender.
+ */
@Test
- public void textWillDisappear() {
- openPage();
+ public void testTextWillDisappear() {
+ scrollIntoView(LOC_INPUT_TEST2_NAME1, true);
- Assert.assertTrue(StringUtils.isNotBlank(selenium.getText(textDisappears)));
-
- selenium.type(name3, input);
- selenium.fireEvent(name3, "keyup");
-
- Wait.until(new Condition() {
+ assertTrue(StringUtils.isNotBlank(selenium.getText(LOC_OUTPUT_TEXT_DISAPPEAR)),
+ "Text under first input should not be blank");
+
+ selenium.type(LOC_INPUT_TEST2_NAME1, MSG_INPUT_SAMPLE);
+ selenium.fireEvent(LOC_INPUT_TEST2_NAME1, Event.KEYUP);
+
+ Wait.failWith("Typed name never changes after firing event on input").until(new Condition() {
public boolean isTrue() {
- return formatMess("ajax-region--typed-name", input(input)).equals(selenium.getText(outname2));
+ String expectedText = format(MSG_OUTPUT_TYPED_NAME_PREFORMATTED, input(MSG_INPUT_SAMPLE));
+ return expectedText.equals(selenium.getText(LOC_OUTPUT_TEST2_TYPED_NAME));
}
});
-
- Assert.assertTrue(StringUtils.isBlank(selenium.getText(textDisappears)));
+
+ assertTrue(StringUtils.isBlank(selenium.getText(LOC_OUTPUT_TEXT_DISAPPEAR)),
+ "Text didn't disappear as expected when input changed");
}
-
+
+ /**
+ * Test types sample into input and checks that text under input will not
+ * disappear when region rendered.
+ */
@Test
- public void textWillNotDisappear() {
- openPage();
+ public void testTextWillNotDisappear() {
+ scrollIntoView(LOC_INPUT_TEST2_NAME2, true);
+
+ assertTrue(StringUtils.isNotBlank(selenium.getText(LOC_OUTPUT_TEXT_NOT_DISAPPER)),
+ "Text under second input should not be blank");
- Assert.assertTrue(StringUtils.isNotBlank(selenium.getText(textNotDisappears)));
-
- selenium.type(name4, input);
- selenium.fireEvent(name4, "keyup");
-
- Wait.until(new Condition() {
+ selenium.type(LOC_INPUT_TEST2_NAME2, MSG_INPUT_SAMPLE);
+ selenium.fireEvent(LOC_INPUT_TEST2_NAME2, Event.KEYUP);
+
+ Wait.failWith("Typed name never changes after firing event on input").until(new Condition() {
public boolean isTrue() {
- return formatMess("ajax-region--typed-name", input(input)).equals(selenium.getText(outname2));
+ String expectedText = format(MSG_OUTPUT_TYPED_NAME_PREFORMATTED, input(MSG_INPUT_SAMPLE));
+ return expectedText.equals(selenium.getText(LOC_OUTPUT_TEST2_TYPED_NAME));
}
});
+
+ assertTrue(StringUtils.isNotBlank(selenium.getText(LOC_OUTPUT_TEXT_NOT_DISAPPER)),
+ "Text disappeared even it wasn't expected when input changed");
+ }
+
+ private void name1AloneDontPassValidation() {
+ final String expectedTypedName = format(MSG_OUTPUT_TYPED_NAME_PREFORMATTED, "");
+
+ scrollIntoView(LOC_INPUT_TEST1_NAME1, true);
- Assert.assertTrue(StringUtils.isNotBlank(selenium.getText(textNotDisappears)));
+ selenium.type(LOC_INPUT_TEST1_NAME1, MSG_INPUT_SAMPLE);
+ selenium.fireEvent(LOC_INPUT_TEST1_NAME1, Event.KEYUP);
+
+ Wait.failWith(format("Validation message never appears or doesn't contain '{0}'", MSG_MESSAGE_VALUE_REQUIRED))
+ .until(new Condition() {
+ public boolean isTrue() {
+ if (!selenium.isElementPresent(LOC_OUTPUT_VALIDATION_MESSAGE))
+ return false;
+ return selenium.getText(LOC_OUTPUT_VALIDATION_MESSAGE).contains(MSG_MESSAGE_VALUE_REQUIRED);
+ }
+ });
+
+ assertEquals(selenium.getText(LOC_OUTPUT_TEST1_TYPED_NAME), expectedTypedName,
+ "Typed name should isn't blank as expected");
}
-
- public void name1DontPassValidation() {
- selenium.type(name1, input);
- selenium.fireEvent(name1, firedEvent);
-
- Wait.until(new Condition() {
+
+ private void job1ChangeInfluenceName1Validation() {
+ final String expectedTypedName = format(MSG_OUTPUT_TYPED_NAME_PREFORMATTED, input(MSG_INPUT_SAMPLE));
+
+ assertTrue(selenium.getText(LOC_OUTPUT_VALIDATION_MESSAGE).contains(MSG_MESSAGE_VALUE_REQUIRED), format(
+ "Validation message doesn't contain '{0}'", MSG_MESSAGE_VALUE_REQUIRED));
+
+ selenium.type(LOC_INPUT_TEST1_JOB1, MSG_INPUT_SAMPLE);
+ selenium.fireEvent(LOC_INPUT_TEST1_NAME1, Event.KEYUP);
+
+ Wait.failWith("Validation message did not disappear").until(new Condition() {
public boolean isTrue() {
- if (!selenium.isElementPresent(messages)) return false;
- return selenium.getText(messages).contains(getMess("ajax-region--value-is-required"));
+ return !selenium.isElementPresent(LOC_OUTPUT_VALIDATION_MESSAGE);
}
});
-
- Assert.assertEquals(selenium.getText(outname), formatMess("ajax-region--typed-name", ""));
+
+ assertEquals(selenium.getText(LOC_OUTPUT_TEST1_TYPED_NAME), expectedTypedName, format(
+ "Typed name does not contain value '{0}'", expectedTypedName));
}
-
- public void job1ChangeInfluenceName1Validation() {
- Assert.assertTrue(selenium.getText(messages).contains(getMess("ajax-region--value-is-required")));
-
- selenium.type(job1, input);
- selenium.fireEvent(name1, "keyup");
-
- Wait.until(new Not() {
- public boolean not() {
- return selenium.isElementPresent(messages);
- }
- });
-
- Assert.assertEquals(selenium.getText(outname), formatMess("ajax-region--typed-name", input(input)));
+
+ private void name1CanBeChangedAnywayIfJob1IsNotBlank() {
+ assertFalse(selenium.isElementPresent(LOC_OUTPUT_VALIDATION_MESSAGE),
+ "Validation message should not be present");
+ assertTrue(StringUtils.isNotBlank(selenium.getValue(LOC_INPUT_TEST1_JOB1)),
+ "First Job input should not be blank");
+
+ tryTypingToInput(LOC_INPUT_TEST1_NAME1);
}
-
- public void name1CanBeChangedAnywayIfJob1IsNotBlank() {
- Assert.assertFalse(selenium.isElementPresent(messages));
- Assert.assertTrue(StringUtils.isNotBlank(selenium.getValue(job1)));
+
+ private void tryTypingToInput(String locator) {
+ scrollIntoView(locator, true);
- trySomeInputs(name1);
- }
-
- public void trySomeInputs(String locator) {
- for (final String enter : new String[]{"", input}) {
- selenium.type(locator, enter);
- selenium.fireEvent(locator, "keyup");
-
- Wait.until(new Condition() {
+ for (final String enterValue : new String[] { "", MSG_INPUT_SAMPLE, "" }) {
+ final String expectedTypedName = format(MSG_OUTPUT_TYPED_NAME_PREFORMATTED, input(enterValue));
+
+ selenium.type(locator, enterValue);
+ selenium.fireEvent(locator, Event.KEYUP);
+
+ Wait.failWith(format("Typed name did not changed to '{0}'", expectedTypedName)).until(new Condition() {
public boolean isTrue() {
- return formatMess("ajax-region--typed-name", input(enter)).equals(selenium.getText(outname));
+ return expectedTypedName.equals(selenium.getText(LOC_OUTPUT_TEST1_TYPED_NAME));
}
});
-
- Assert.assertFalse(selenium.isElementPresent(messages));
+
+ assertFalse(selenium.isElementPresent(LOC_OUTPUT_VALIDATION_MESSAGE),
+ "Validation message should not appear");
}
}
-
- public String input(String input) {
+
+ private String input(String input) {
if (StringUtils.isBlank(input)) {
return "";
} else {
return " " + input;
}
}
+
+ /**
+ * Opens specific component's page
+ */
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Ajax Region");
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties 2009-09-01 22:31:02 UTC (rev 15426)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/locators.properties 2009-09-02 06:12:16 UTC (rev 15427)
@@ -1,4 +1,5 @@
-ajax-region--input=//fieldset[{0}]//table//td[{1}]//table//tr[{2}]//input[@type\='text']
-ajax-region--messages=//fieldset[1]/div[1]/*[2]/ul/li
-ajax-region--typed-name=//span[@id\='outname{0}']
-ajax-region--influenced-text=//span[@id\='out{0}']
+INPUT_RELATIVE=//fieldset[{0}]//table//td[{1}]//table//tr[{2}]//input[@type\='text']
+OUTPUT_VALIDATION_MESSAGE=//fieldset[1]/div[1]/*[2]/ul/li
+OUTPUT_TEST1_TYPED_NAME=//span[@id\='outname']
+OUTPUT_TEST2_TYPED_NAME=//span[@id\='outname2']
+OUTPUT_TEST2_INFLUENCED_TEXT_PREFORMATTED=//span[@id\='out{0}']
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/messages.properties 2009-09-01 22:31:02 UTC (rev 15426)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxRegion/messages.properties 2009-09-02 06:12:16 UTC (rev 15427)
@@ -1,4 +1,3 @@
-ajax-region--input=input
-ajax-region--typed-name=Typed Name\:{0}
-ajax-region--value-is-required=Value is required
-ajax-region--fired-event=keyup
+INPUT_SAMPLE=sample
+OUTPUT_TYPED_NAME_PREFORMATTED=Typed Name\:{0}
+MESSAGE_VALUE_REQUIRED=Value is required
13 years, 6 months
JBoss Rich Faces SVN: r15426 - root/framework/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-09-01 18:31:02 -0400 (Tue, 01 Sep 2009)
New Revision: 15426
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
Log:
https://jira.jboss.org/jira/browse/RF-7799
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2009-09-01 19:13:48 UTC (rev 15425)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2009-09-01 22:31:02 UTC (rev 15426)
@@ -385,7 +385,7 @@
}
};
- //TODO take events just from .java code using #{...}
+ //TODO take events just from .java code using EL-expression
var AJAX_EVENTS = ['begin', 'complete', 'beforedomupdate'];
richfaces.ajax = function(source, event, options) {
13 years, 7 months
JBoss Rich Faces SVN: r15425 - in branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test: resources/org/jboss/richfaces/integrationTest/ajaxForm and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-09-01 15:13:48 -0400 (Tue, 01 Sep 2009)
New Revision: 15425
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/messages.properties
Log:
- refactored Ajax Form test cases to follow conventions
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java 2009-09-01 15:56:05 UTC (rev 15424)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/ajaxForm/AjaxFormTestCase.java 2009-09-01 19:13:48 UTC (rev 15425)
@@ -1,7 +1,28 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This code is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This code 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 test suite; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.jboss.richfaces.integrationTest.ajaxForm;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
-import org.testng.Assert;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.thoughtworks.selenium.Wait;
@@ -11,37 +32,39 @@
* @version $Revision$
*/
public class AjaxFormTestCase extends AbstractSeleniumRichfacesTestCase {
- /**
- * Opens specified page
- */
- private void openPage() {
- selenium.open(contextPath + "/richfaces/form.jsf?c=form&tab=usage");
- scrollIntoView(header, true);
- }
+ private String LOC_LEGEND_HEADER = getLoc("LEGEND_HEADER");
+ private String LOC_BUTTON_AJAX = getLoc("BUTTON_AJAX");
+ private String LOC_BUTTON_NON_AJAX = getLoc("BUTTON_NON_AJAX");
+ private String LOC_OUTPUT_TEXT_RELATIVE = getLoc("OUTPUT_TEXT_RELATIVE");
+ private String LOC_OUTPUT_AJAX = format(LOC_OUTPUT_TEXT_RELATIVE, LOC_BUTTON_AJAX);
+ private String LOC_OUTPUT_NON_AJAX = format(LOC_OUTPUT_TEXT_RELATIVE, LOC_BUTTON_NON_AJAX);
- private String header = "//legend[text()='AjaxForm Demo']";
- private String ajaxButton = getLoc("ajax-form--ajax-button");
- private String nonAjaxButton = getLoc("ajax-form--non-ajax-button");
- private String textRelative = "ajax-form--text-relative";
- private String ajaxText = formatLoc(textRelative, ajaxButton);
- private String nonAjaxText = formatLoc(textRelative, nonAjaxButton);
+ private final String MSG_OUTPUT_NON_AJAX = getMsg("OUTPUT_NON_AJAX");
+ private final String MSG_OUTPUT_AJAX = getMsg("OUTPUT_AJAX");
+ /**
+ * Sends non-Ajax request and check that it changes both of output fields.
+ */
@Test
public void testNonAjaxSubmit() {
- openPage();
nonAjaxSubmit();
}
+ /**
+ * Sends Ajax request and check that it changes only ajax-rendered field.
+ */
@Test
public void testAjaxSubmit() {
- openPage();
ajaxSubmit();
}
+ /**
+ * Test interleaving of non-Ajax and Ajax requested changes and checks that
+ * it is rendered in right way.
+ */
@Test
public void testInterleaving() {
- openPage();
ajaxSubmit();
nonAjaxSubmit();
ajaxSubmit();
@@ -49,28 +72,39 @@
}
public void nonAjaxSubmit() {
- String expected = getMess("ajax-form--non-ajax-result");
-
- selenium.click(nonAjaxButton);
+ selenium.click(LOC_BUTTON_NON_AJAX);
selenium.waitForPageToLoad(String.valueOf(Wait.DEFAULT_TIMEOUT));
- scrollIntoView(header, true);
- String actual = selenium.getText(ajaxText);
- Assert.assertEquals(actual, expected);
+ scrollIntoView(LOC_LEGEND_HEADER, true);
- actual = selenium.getText(nonAjaxText);
- Assert.assertEquals(actual, expected);
+ // both of outputs should be same
+ String actual = selenium.getText(LOC_OUTPUT_AJAX);
+ assertEquals(actual, MSG_OUTPUT_NON_AJAX);
+
+ actual = selenium.getText(LOC_OUTPUT_NON_AJAX);
+ assertEquals(actual, MSG_OUTPUT_NON_AJAX);
}
public void ajaxSubmit() {
- String expected = getMess("ajax-form--ajax-result");
+ String startingNonAjaxText = selenium.getText(LOC_OUTPUT_NON_AJAX);
- String startingNonAjaxText = selenium.getText(nonAjaxText);
+ // ajax-rendered output should be set right
+ selenium.click(LOC_BUTTON_AJAX);
+ waitForTextEquals(LOC_OUTPUT_AJAX, MSG_OUTPUT_AJAX);
- selenium.click(ajaxButton);
- waitForTextEquals(ajaxText, expected);
+ // non-ajax output should stay same like before the request
+ String actual = selenium.getText(LOC_OUTPUT_NON_AJAX);
+ assertEquals(actual, startingNonAjaxText);
+ }
- String actual = selenium.getText(nonAjaxText);
- Assert.assertEquals(actual, startingNonAjaxText);
+ /**
+ * Opens specific component's page
+ */
+ @SuppressWarnings("unused")
+ @BeforeMethod
+ private void loadPage() {
+ openComponent("Ajax Form");
+
+ scrollIntoView(LOC_LEGEND_HEADER, true);
}
}
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties 2009-09-01 15:56:05 UTC (rev 15424)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/locators.properties 2009-09-01 19:13:48 UTC (rev 15425)
@@ -1,3 +1,4 @@
-ajax-form--ajax-button=//input[@type\='submit' and @value\="Set Local Name to John (Ajax)"]
-ajax-form--non-ajax-button=//input[@type\='submit' and @value\="Set Both Name to Mark (non-Ajax)"]
-ajax-form--text-relative={0}/../../../tr[2]/*/*/text()
\ No newline at end of file
+LEGEND_HEADER=//legend[text()\='AjaxForm Demo']
+BUTTON_AJAX=//input[@type\='submit' and @value\="Set Local Name to John (Ajax)"]
+BUTTON_NON_AJAX=//input[@type\='submit' and @value\="Set Both Name to Mark (non-Ajax)"]
+OUTPUT_TEXT_RELATIVE={0}/../../../tr[2]/*/*/text()
\ No newline at end of file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/messages.properties
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/messages.properties 2009-09-01 15:56:05 UTC (rev 15424)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/ajaxForm/messages.properties 2009-09-01 19:13:48 UTC (rev 15425)
@@ -1,2 +1,2 @@
-ajax-form--ajax-result=Name\:John
-ajax-form--non-ajax-result=Name\:Mark
\ No newline at end of file
+OUTPUT_AJAX=Name\:John
+OUTPUT_NON_AJAX=Name\:Mark
\ No newline at end of file
13 years, 7 months
JBoss Rich Faces SVN: r15424 - branches/community/3.3.X/ui/panelmenu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-09-01 11:56:05 -0400 (Tue, 01 Sep 2009)
New Revision: 15424
Modified:
branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml
Log:
panelMenuGroup: accesskey, maxlength, name, size and tabindex attributes should be hidden
https://jira.jboss.org/jira/browse/RF-7444
Modified: branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml 2009-09-01 15:25:18 UTC (rev 15423)
+++ branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml 2009-09-01 15:56:05 UTC (rev 15424)
@@ -430,47 +430,19 @@
<description>Path to the icon to be displayed for the disabled item state.</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- <property hidden="true">
- <name>accesskey</name>
- <classname>java.lang.String</classname>
- <description></description>
- </property>
- <property hidden="true">
- <name>maxlength</name>
- <classname>int</classname>
- <description>Specifies the maximum number of digits that could be entered into the input field.
- The maximum number is unlimited by default.
- </description>
- </property>
<property>
<name>expanded</name>
<classname>boolean</classname>
<description>If true group will be displayed expanded initially. Default value is "false".</description>
<defaultvalue>false</defaultvalue>
</property>
- <property hidden="true">
- <name>size</name>
- <classname>int</classname>
- <description>This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters</description>
- </property>
- <property hidden="true">
- <name>tabindex</name>
- <classname>int</classname>
- <description>Serves to define the tabbing order</description>
- </property>
<property>
<name>disabled</name>
<classname>boolean</classname>
<description> If true sets state of the item to disabled state. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
- <property hidden="true">
- <name>name</name>
- <classname>java.lang.String</classname>
- <description>Refers to group/item with the same
- name. Default value is "getId()".</description>
- <defaultvalue>getId()</defaultvalue>
- </property>
+
<!--property>
<name>value</name>
<classname>java.lang.Object</classname>
@@ -492,6 +464,36 @@
&ajax_component_attributes;
&ui_command_attributes;
+ <property hidden="true">
+ <name>accesskey</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property hidden="true">
+ <name>maxlength</name>
+ <classname>int</classname>
+ <description>Specifies the maximum number of digits that could be entered into the input field.
+ The maximum number is unlimited by default.
+ </description>
+ </property>
+ <property hidden="true">
+ <name>name</name>
+ <classname>java.lang.String</classname>
+ <description>Refers to group/item with the same
+ name. Default value is "getId()".</description>
+ <defaultvalue>getId()</defaultvalue>
+ </property>
+ <property hidden="true">
+ <name>size</name>
+ <classname>int</classname>
+ <description>This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters</description>
+ </property>
+ <property hidden="true">
+ <name>tabindex</name>
+ <classname>int</classname>
+ <description>Serves to define the tabbing order</description>
+ </property>
+
<property hidden="true">
<name>onblur</name>
<classname>java.lang.String</classname>
13 years, 7 months
JBoss Rich Faces SVN: r15423 - in branches/community/3.3.X/ui/extendedDataTable/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-09-01 11:25:18 -0400 (Tue, 01 Sep 2009)
New Revision: 15423
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
ExtendedDataTable problem with scrolls in case summary width of columns is begger then width of the table.
https://jira.jboss.org/jira/browse/RF-5751
Modified: branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
--- branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-01 15:14:35 UTC (rev 15422)
+++ branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-01 15:25:18 UTC (rev 15423)
@@ -298,9 +298,7 @@
this.footer = $(this.id +":footer");
if (ClientUILib.isOpera) {
//no overflow-x nor overflow-y in Opera
- this.scrollingDiv.setStyle({overflow: 'scroll',
- width: this.mainDiv.getWidth()
- });
+ this.scrollingDiv.setStyle({width: this.mainDiv.getWidth()});
this.table.setStyle({width: this.mainDiv.getWidth()});
};
@@ -401,7 +399,10 @@
cols[columnsNumber-1].width = null;
cols[cols.length-1].width = null;
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
- newHeight -= this.header.getCaptionHeight();
+ var caption = header.getCaption()
+ if (caption && caption.tagName == "caption") {
+ newHeight -= this.header.getCaptionHeight();
+ }
scrollingDiv.setStyle('height:'+ newHeight +'px;');
this._redrawTable(table);
header.adjustSeparators();
Modified: branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-09-01 15:14:35 UTC (rev 15422)
+++ branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-09-01 15:25:18 UTC (rev 15423)
@@ -54,17 +54,16 @@
>
<div id="#{clientId}:od" class="extdt-outerdiv"
- style="width:100%; height:100%;overflow-y:hidden;overflow-x:auto;"
+ style="width:100%; height:100%;overflow: hidden;"
>
<div id="#{clientId}:dataTable_indicator" class="drgind_fly drgind_default drag_indicator" style="display: none;" >
<f:call name="encodeNamespace" />
-
- <script type="text/javascript">
- //<![CDATA[
- #{this:encodeDragDropChildScripts(context, component)};
- //]]>
- </script>
</div>
+ <script type="text/javascript">
+ //<![CDATA[
+ #{this:encodeDragDropChildScripts(context, component)};
+ //]]>
+ </script>
<span id="#{clientId}:dataTable_indicator_span" />
<div id="#{clientId}:innerd" class="extdt-innerdiv" style="height:100%;width:100%;">
<div id="#{clientId}:cs" class="extdt-hsplit" style="display: none;"/>
@@ -82,7 +81,7 @@
<tbody>
<tr>
<td colspan="#{columnsCount}" style="padding: 0px;">
- <div id="#{clientId}:sd" class="extdt-content" style="height:50px;width:100%;">
+ <div id="#{clientId}:sd" class="extdt-content" style="height:50px;width:100%;overflow:hidden;">
<jsp:scriptlet>
<![CDATA[
if (component.getRowCount() <= 0) {
@@ -103,7 +102,7 @@
}
]]>
</jsp:scriptlet>
- <table id="#{clientId}:n" width="100%"
+ <table id="#{clientId}:n" style="width:100%; height:100%;overflow: hidden;"
class="extdt-table-layout rich-table #{component.attributes['styleClass']}"
>
<f:call name="utils.encodePassThruWithExclusions">
13 years, 7 months
JBoss Rich Faces SVN: r15421 - branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-09-01 11:12:47 -0400 (Tue, 01 Sep 2009)
New Revision: 15421
Modified:
branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java
Log:
RF-7669
Modified: branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java
===================================================================
--- branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java 2009-09-01 14:06:42 UTC (rev 15420)
+++ branches/community/3.3.X/ui/core/src/main/java/org/ajax4jsf/renderkit/html/MediaOutputRenderer.java 2009-09-01 15:12:47 UTC (rev 15421)
@@ -128,6 +128,8 @@
}
writer.writeURIAttribute(uriAttribute,uri,"uri");
getUtils().encodeAttributesFromArray(context,component,HTML.PASS_THRU_STYLES);
+ getUtils().encodeAttribute(context, component, HTML.TYPE_ATTR);
+ getUtils().encodeAttribute(context, component, "classid");
getUtils().encodePassThru(context,mmedia);
}
13 years, 7 months
JBoss Rich Faces SVN: r15419 - branches/community/3.3.X/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-09-01 10:00:23 -0400 (Tue, 01 Sep 2009)
New Revision: 15419
Removed:
branches/community/3.3.X/docs/userguide/en/src/main/resources/images/columns_oc.png
branches/community/3.3.X/docs/userguide/en/src/main/resources/images/columns_pc.png
Log:
https://jira.jboss.org/jira/browse/RF-7678 - deleting unnecessary images;
Deleted: branches/community/3.3.X/docs/userguide/en/src/main/resources/images/columns_oc.png
===================================================================
(Binary files differ)
Deleted: branches/community/3.3.X/docs/userguide/en/src/main/resources/images/columns_pc.png
===================================================================
(Binary files differ)
13 years, 7 months