JBoss Rich Faces SVN: r12260 - trunk/ui/orderingList/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-01-13 14:09:17 -0500 (Tue, 13 Jan 2009)
New Revision: 12260
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
Log:
https://jira.jboss.org/jira/browse/RF-5721
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
--- trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2009-01-13 18:45:49 UTC (rev 12259)
+++ trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2009-01-13 19:09:17 UTC (rev 12260)
@@ -314,8 +314,8 @@
setValid(false);
}
- protected void processValidators(FacesContext context, Object newValue) {
- Validator[] validators = getValidators();
+ protected void validateValue(FacesContext context, Object newValue) {
+ Validator[] validators = getValidators();
for (int i = 0; i < validators.length; i++) {
Validator validator = (Validator) validators[i];
try {
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
--- trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2009-01-13 18:45:49 UTC (rev 12259)
+++ trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2009-01-13 19:09:17 UTC (rev 12260)
@@ -508,7 +508,7 @@
requiredInvalidate(context);
}
} else {
- processValidators(context, newValue);
+ super.validateValue(context, newValue);
}
}
}
17 years, 3 months
JBoss Rich Faces SVN: r12259 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/tabPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-13 13:45:49 -0500 (Tue, 13 Jan 2009)
New Revision: 12259
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelAutoTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5561
https://jira.jboss.org/jira/browse/RF-5562
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2009-01-13 18:21:41 UTC (rev 12258)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2009-01-13 18:45:49 UTC (rev 12259)
@@ -27,237 +27,241 @@
import javax.faces.event.ActionEvent;
public class RichPanelTestBean {
- private String value;
+ private String value;
- private int value2;
+ private int value2;
- private Object panelValue;
+ private Object panelValue;
- private Object panelValue2;
+ private Object panelValue2;
- private String itemAction;
+ private String itemAction;
- private boolean rendered;
+ private boolean rendered;
- private String content;
+ private String content;
- private String switchType = "server";
+ private String switchType = "server";
- private String selectedTab = "tab1";
+ private String selectedTab = "tab1";
- private Map<String, String> inputs = new HashMap<String, String>();
+ private Map<String, String> inputs = new HashMap<String, String>();
- public RichPanelTestBean() {
- value = "";
- value2 = 0;
- rendered = true;
- content = "content";
- }
+ public RichPanelTestBean() {
+ value = "";
+ value2 = 0;
+ rendered = true;
+ content = "content";
+ }
- public void reset() {
- value = "";
- value2 = 0;
- rendered = true;
- content = "content";
- selectedTab = "tab1";
- }
+ public void reset() {
+ value = "";
+ value2 = 0;
+ rendered = true;
+ content = "content";
+ selectedTab = "tab1";
+ }
- public void reset(ActionEvent event) {
- reset();
- }
+ public void initAjaxCoreTest() {
+ selectedTab = "tab1";
+ }
- /**
- * Gets value of switchType field.
- *
- * @return value of switchType field
- */
- public String getSwitchType() {
- return switchType;
- }
+ public void reset(ActionEvent event) {
+ reset();
+ }
- /**
- * Set a new value for switchType field.
- *
- * @param switchType
- * a new value for switchType field
- */
- public void setSwitchType(String switchType) {
- this.switchType = switchType;
- }
+ /**
+ * Gets value of switchType field.
+ *
+ * @return value of switchType field
+ */
+ public String getSwitchType() {
+ return switchType;
+ }
- public String getValue() {
- return value;
- }
+ /**
+ * Set a new value for switchType field.
+ *
+ * @param switchType
+ * a new value for switchType field
+ */
+ public void setSwitchType(String switchType) {
+ this.switchType = switchType;
+ }
- public void setValue(String value) {
- this.value = value;
- }
+ public String getValue() {
+ return value;
+ }
- public int getValue2() {
- return value2;
- }
+ public void setValue(String value) {
+ this.value = value;
+ }
- public void setValue2(int value2) {
- this.value2 = value2;
- }
+ public int getValue2() {
+ return value2;
+ }
- public Object getPanelValue() {
- return panelValue;
- }
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
- public void setPanelValue(Object panelValue) {
- this.panelValue = panelValue;
- }
+ public Object getPanelValue() {
+ return panelValue;
+ }
- public Object getPanelValue2() {
- return panelValue2;
- }
+ public void setPanelValue(Object panelValue) {
+ this.panelValue = panelValue;
+ }
- public void setPanelValue2(Object panelValue2) {
- this.panelValue2 = panelValue2;
- }
+ public Object getPanelValue2() {
+ return panelValue2;
+ }
- /**
- * Gets value of content field.
- *
- * @return value of content field
- */
- public String getContent() {
- return content;
- }
+ public void setPanelValue2(Object panelValue2) {
+ this.panelValue2 = panelValue2;
+ }
- /**
- * Set a new value for content field.
- *
- * @param content
- * a new value for content field
- */
- public void setContent(String content) {
- this.content = content;
- }
+ /**
+ * Gets value of content field.
+ *
+ * @return value of content field
+ */
+ public String getContent() {
+ return content;
+ }
- /**
- * Gets value of itemAction field.
- *
- * @return value of itemAction field
- */
- public String getItemAction() {
- return itemAction;
- }
+ /**
+ * Set a new value for content field.
+ *
+ * @param content
+ * a new value for content field
+ */
+ public void setContent(String content) {
+ this.content = content;
+ }
- /**
- * Set a new value for itemAction field.
- *
- * @param itemAction
- * a new value for itemAction field
- */
- public void setItemAction(String itemAction) {
- this.itemAction = itemAction;
- }
+ /**
+ * Gets value of itemAction field.
+ *
+ * @return value of itemAction field
+ */
+ public String getItemAction() {
+ return itemAction;
+ }
- /**
- * Gets value of rendered field.
- *
- * @return value of rendered field
- */
- public boolean isRendered() {
- return rendered;
- }
+ /**
+ * Set a new value for itemAction field.
+ *
+ * @param itemAction
+ * a new value for itemAction field
+ */
+ public void setItemAction(String itemAction) {
+ this.itemAction = itemAction;
+ }
- /**
- * Set a new value for rendered field.
- *
- * @param rendered
- * a new value for rendered field
- */
- public void setRendered(boolean rendered) {
- this.rendered = rendered;
- }
+ /**
+ * Gets value of rendered field.
+ *
+ * @return value of rendered field
+ */
+ public boolean isRendered() {
+ return rendered;
+ }
- public void actionListener(ActionEvent event) {
- this.value = event.getComponent().getId();
- }
+ /**
+ * Set a new value for rendered field.
+ *
+ * @param rendered
+ * a new value for rendered field
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
- public void itemActionServer() {
- setItemAction("server");
- }
+ public void actionListener(ActionEvent event) {
+ this.value = event.getComponent().getId();
+ }
- public void itemActionAjax() {
- setItemAction("ajax");
- }
+ public void itemActionServer() {
+ setItemAction("server");
+ }
- public void itemActionNone() {
- setItemAction("NOT none");
- }
+ public void itemActionAjax() {
+ setItemAction("ajax");
+ }
- public String increment() {
- if (4 == this.value2) {
- this.value2 = 0;
- }
- this.value2++;
- return null;
- }
+ public void itemActionNone() {
+ setItemAction("NOT none");
+ }
- public void hide() {
- rendered = false;
- }
+ public String increment() {
+ if (4 == this.value2) {
+ this.value2 = 0;
+ }
+ this.value2++;
+ return null;
+ }
- public void reset2Server() {
- cleanValues();
- content = "";
- switchType = "server";
- }
+ public void hide() {
+ rendered = false;
+ }
- public void reset2Ajax() {
- cleanValues();
- content = "";
- switchType = "ajax";
- }
+ public void reset2Server() {
+ cleanValues();
+ content = "";
+ switchType = "server";
+ }
- public void reset2Client() {
- cleanValues();
- content = "";
- switchType = "client";
- }
+ public void reset2Ajax() {
+ cleanValues();
+ content = "";
+ switchType = "ajax";
+ }
- public void cleanValues() {
- value = "";
- value2 = 0;
- panelValue = null;
- panelValue2 = null;
- itemAction = "";
- rendered = true;
- content = "content";
- }
+ public void reset2Client() {
+ cleanValues();
+ content = "";
+ switchType = "client";
+ }
- /**
- * @return the selectedTab
- */
- public String getSelectedTab() {
- return selectedTab;
- }
+ public void cleanValues() {
+ value = "";
+ value2 = 0;
+ panelValue = null;
+ panelValue2 = null;
+ itemAction = "";
+ rendered = true;
+ content = "content";
+ }
- /**
- * @param selectedTab
- * the selectedTab to set
- */
- public void setSelectedTab(String selectedTab) {
- this.selectedTab = selectedTab;
- }
+ /**
+ * @return the selectedTab
+ */
+ public String getSelectedTab() {
+ return selectedTab;
+ }
- /**
- * @return the inputs
- */
- public Map<String, String> getInputs() {
- return inputs;
- }
+ /**
+ * @param selectedTab
+ * the selectedTab to set
+ */
+ public void setSelectedTab(String selectedTab) {
+ this.selectedTab = selectedTab;
+ }
- /**
- * @param inputs
- * the inputs to set
- */
- public void setInputs(Map<String, String> inputs) {
- this.inputs = inputs;
- }
+ /**
+ * @return the inputs
+ */
+ public Map<String, String> getInputs() {
+ return inputs;
+ }
+ /**
+ * @param inputs
+ * the inputs to set
+ */
+ public void setInputs(Map<String, String> inputs) {
+ this.inputs = inputs;
+ }
+
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelAutoTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelAutoTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-13 18:21:41 UTC (rev 12258)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-13 18:45:49 UTC (rev 12259)
@@ -20,158 +20,195 @@
*/
package org.richfaces.testng;
+import java.util.HashMap;
+import java.util.Map;
+
import org.ajax4jsf.template.Template;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
-import com.thoughtworks.selenium.SeleniumException;
-
public class TabPanelTest extends SeleniumTestBase {
- static final String FORM_ID = "_form:";
-
- static final String RESET_METHOD = "#{panelBean.reset}";
+ private static final String FORM_ID = "_form:";
- @Test
- public void testRichTabPanelComponent(Template template) {
- renderPage(template, RESET_METHOD);
- String parentId = getParentId() + FORM_ID;
- String linkId = parentId + "tab2_lbl";
- String tabId1 = parentId + "tab1";
- String tabId2 = parentId + "tab2";
- String tabId4 = parentId + "tab4";
+ private static final String RESET_METHOD = "#{panelBean.reset}";
- writeStatus("Click on tab2");
- clickById(linkId);
- waitForAjaxCompletion();
- AssertTextEquals(tabId2, "Tab two");
- AssertVisible(tabId2);
- AssertNotVisible(tabId4);
+ private final static String INIT_AJAX_CORE_TEST = "#{panelBean.initAjaxCoreTest}";
- writeStatus("Click on tab1");
- linkId = parentId + "tab1_lbl";
- clickCommandAndWait(linkId);
- AssertTextEquals(tabId1, "Tab one");
- AssertVisible(tabId1);
- AssertNotVisible(tabId4);
+ private static Map<String, String> params = new HashMap<String, String>();
- writeStatus("Click on tab3");
- linkId = parentId + "tab3_lbl";
- clickById(linkId);
- AssertVisible(tabId1);
+ static {
+ params.put("parameter1", "value1");
+ params.put("parameter2", "value2");
+ params.put("parameter3", "value3");
+ }
- writeStatus("Click on tab4");
- linkId = parentId + "tab4_lbl";
- clickById(linkId);
- AssertVisible(tabId4);
- AssertNotVisible(tabId1);
- }
+ @Test
+ public void testRichTabPanelComponent(Template template) {
+ renderPage(template, RESET_METHOD);
+ String parentId = getParentId() + FORM_ID;
+ String linkId = parentId + "tab2_lbl";
+ String tabId1 = parentId + "tab1";
+ String tabId2 = parentId + "tab2";
+ String tabId4 = parentId + "tab4";
- @Test
- public void testSubmissionModesAndListeners(Template template) {
- renderPage(template, RESET_METHOD);
+ writeStatus("Click on tab2");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertTextEquals(tabId2, "Tab two");
+ AssertVisible(tabId2);
+ AssertNotVisible(tabId4);
- String parentId = getParentId();
+ writeStatus("Click on tab1");
+ linkId = parentId + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertTextEquals(tabId1, "Tab one");
+ AssertVisible(tabId1);
+ AssertNotVisible(tabId4);
- testListener(parentId);
- testSubmissionModes(parentId);
-
- }
-
- private void testListener (String parentId) {
-
- String linkId = parentId + FORM_ID + "tab2_lbl";
- String inputId = parentId + FORM_ID + "_value";
-
- writeStatus("Click on tab2");
- clickById(linkId);
- waitForAjaxCompletion();
- AssertTextEquals(inputId, "tab2", "Listener for the second tab [ajax mode] has not been called");
+ writeStatus("Click on tab3");
+ linkId = parentId + "tab3_lbl";
+ clickById(linkId);
+ AssertVisible(tabId1);
- writeStatus("Click on tab1");
- linkId = parentId + FORM_ID + "tab1_lbl";
- clickCommandAndWait(linkId);
- AssertTextEquals(inputId, "tab1", "Listener for the first tab [server mode] has not been called");
- }
-
-
- private void testSubmissionModes(String parentId) {
- String tabId1 = parentId + FORM_ID + "tab1";
- String tabId2 = parentId + FORM_ID + "tab2";
- String tabId4 = parentId + FORM_ID + "tab4";
-
- reset(parentId);
-
- // Set input for the first tab
- setValueById(tabId1 + "_input", "text1");
- clickById(tabId2 + "_lbl");
- waitForAjaxCompletion();
- checkDecodes(parentId, "text1", "", "");
-
-
- // Set input for the second and 4th tabs
- setValueById(tabId2 + "_input", "text2");
- setValueById(tabId4 + "_input", "text4");
- clickById(tabId1 + "_lbl");
- waitForPageToLoad();
- checkDecodes(parentId, "text1", "text2", "text4");
-
- // Reset model. Swtich to tyhe first tab
- reset(parentId);
-
- // Switch to 4th tab
- clickById(tabId4 + "_lbl");
- setValueById(tabId4 + "_input", "text");
- submit(parentId);
- AssertVisible(tabId4, "Tab4 (client) should be kept as active after form submition");
- checkDecodes(parentId, "", "", "text");
-
-
- // Switch to 2nd tab
- clickById(tabId2 + "_lbl");
- waitForAjaxCompletion();
- setValueById(tabId4 + "_input", "text4");
- setValueById(tabId2 + "_input", "text2");
- ajaxSubmit(parentId);
- checkDecodes(parentId, "", "text2", "text4");
-
+ writeStatus("Click on tab4");
+ linkId = parentId + "tab4_lbl";
+ clickById(linkId);
+ AssertVisible(tabId4);
+ AssertNotVisible(tabId1);
+ }
- }
-
- private void checkDecodes(String parentId, String input1, String input2, String input4) {
- String inputsId = parentId + FORM_ID + "_inputs";
- String inputs = getTextById(inputsId);
-
- if (!inputs.contains("tab1=" + input1)) {
- Assert.fail("Decode or update model for the first tab processed incorrect. The model should contain ['"+input1+"'] value submitted from the tab");
- }
- if (!inputs.contains("tab2=" + input2)) {
- Assert.fail("Decode or update model for the second tab processed incorrect. The model should contain ['"+input2+"'] value submitted from the tab");
- }
- if (!inputs.contains("tab4=" + input4)) {
- Assert.fail("Decode or update model for the 4th tab processed incorrect. The model should contain ['"+input4+"'] value submitted from the tab");
- }
- }
-
- private void submit(String parentId) {
- String commandId = parentId + FORM_ID + "submit";
- clickCommandAndWait(commandId);
- }
-
- private void ajaxSubmit(String parentId) {
- String commandId = parentId + FORM_ID + "ajaxSubmit";
- clickAjaxCommandAndWait(commandId);
- }
-
- private void reset(String parentId) {
- String commandId = parentId + "controls:reset";
- clickCommandAndWait(commandId);
- }
+ @Test
+ public void testNestedParams(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, INIT_AJAX_CORE_TEST);
+ writeStatus("Test component encodes nested f:param tags and their values are present as request parameters");
+ tester.testRequestParameters(params);
+ }
- @Override
- public String getTestUrl() {
- return "pages/tabPanel/tabPanelTest.xhtml";
- }
+ @Test
+ public void testReRenderAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, INIT_AJAX_CORE_TEST);
+ writeStatus("Test component re-renders another components");
+ tester.testReRender();
+ }
+ @Test
+ public void testSubmissionModesAndListeners(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ String parentId = getParentId();
+
+ testListener(parentId);
+ testSubmissionModes(parentId);
+
+ }
+
+ private void testListener(String parentId) {
+
+ String linkId = parentId + FORM_ID + "tab2_lbl";
+ String inputId = parentId + FORM_ID + "_value";
+
+ writeStatus("Click on tab2");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertTextEquals(inputId, "tab2", "Listener for the second tab [ajax mode] has not been called");
+
+ writeStatus("Click on tab1");
+ linkId = parentId + FORM_ID + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertTextEquals(inputId, "tab1", "Listener for the first tab [server mode] has not been called");
+ }
+
+ private void testSubmissionModes(String parentId) {
+ String tabId1 = parentId + FORM_ID + "tab1";
+ String tabId2 = parentId + FORM_ID + "tab2";
+ String tabId4 = parentId + FORM_ID + "tab4";
+
+ reset(parentId);
+
+ // Set input for the first tab
+ setValueById(tabId1 + "_input", "text1");
+ clickById(tabId2 + "_lbl");
+ waitForAjaxCompletion();
+ checkDecodes(parentId, "text1", "", "");
+
+ // Set input for the second and 4th tabs
+ setValueById(tabId2 + "_input", "text2");
+ setValueById(tabId4 + "_input", "text4");
+ clickById(tabId1 + "_lbl");
+ waitForPageToLoad();
+ checkDecodes(parentId, "text1", "text2", "text4");
+
+ // Reset model. Swtich to tyhe first tab
+ reset(parentId);
+
+ // Switch to 4th tab
+ clickById(tabId4 + "_lbl");
+ setValueById(tabId4 + "_input", "text");
+ submit(parentId);
+ AssertVisible(tabId4, "Tab4 (client) should be kept as active after form submition");
+ checkDecodes(parentId, "", "", "text");
+
+ // Switch to 2nd tab
+ clickById(tabId2 + "_lbl");
+ waitForAjaxCompletion();
+ setValueById(tabId4 + "_input", "text4");
+ setValueById(tabId2 + "_input", "text2");
+ ajaxSubmit(parentId);
+ checkDecodes(parentId, "", "text2", "text4");
+
+ }
+
+ private void checkDecodes(String parentId, String input1, String input2, String input4) {
+ String inputsId = parentId + FORM_ID + "_inputs";
+ String inputs = getTextById(inputsId);
+
+ if (!inputs.contains("tab1=" + input1)) {
+ Assert.fail("Decode or update model for the first tab processed incorrect. The model should contain ['"
+ + input1 + "'] value submitted from the tab");
+ }
+ if (!inputs.contains("tab2=" + input2)) {
+ Assert.fail("Decode or update model for the second tab processed incorrect. The model should contain ['"
+ + input2 + "'] value submitted from the tab");
+ }
+ if (!inputs.contains("tab4=" + input4)) {
+ Assert.fail("Decode or update model for the 4th tab processed incorrect. The model should contain ['"
+ + input4 + "'] value submitted from the tab");
+ }
+ }
+
+ private void submit(String parentId) {
+ String commandId = parentId + FORM_ID + "submit";
+ clickCommandAndWait(commandId);
+ }
+
+ private void ajaxSubmit(String parentId) {
+ String commandId = parentId + FORM_ID + "ajaxSubmit";
+ clickAjaxCommandAndWait(commandId);
+ }
+
+ private void reset(String parentId) {
+ String commandId = parentId + "controls:reset";
+ clickCommandAndWait(commandId);
+ }
+
+ @Override
+ public void sendAjax() {
+ clickAjaxCommandAndWait(getAutoTester(this).getClientId("") + "tab2_lbl");
+ }
+
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/tabPanel/tabPanelAutoTest.xhtml";
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/tabPanel/tabPanelTest.xhtml";
+ }
+
}
17 years, 3 months
JBoss Rich Faces SVN: r12258 - in trunk/test-applications: seleniumTest/richfaces/src/test/java/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-01-13 13:21:41 -0500 (Tue, 13 Jan 2009)
New Revision: 12258
Modified:
trunk/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
algorithm of search of firefox was fixed
Modified: trunk/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 16:59:19 UTC (rev 12257)
+++ trunk/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 18:21:41 UTC (rev 12258)
@@ -133,10 +133,11 @@
return result;
}
});
- for (int k = firefoxes.length - 1; browser == null && k >= 0; k--) {
- System.out.println("-------->firefox#" + k + ": " + firefoxes[k].getPath());
- browser = "*firefox " + firefoxes[k].getPath();
- }
+ if (firefoxes.length > 1 && "firefox-bin".equals(firefoxes[1].getName())) {
+ browser = "*firefox " + firefoxes[1].getPath();
+ } else if (firefoxes.length > 0){
+ browser = "*firefox " + firefoxes[0].getPath();
+ }
}
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 16:59:19 UTC (rev 12257)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 18:21:41 UTC (rev 12258)
@@ -184,10 +184,11 @@
return result;
}
});
- for (int k = firefoxes.length - 1; browser == null && k >= 0; k--) {
- System.out.println("-------->firefox#" + k + ": " + firefoxes[k].getPath());
- browser = "*firefox " + firefoxes[k].getPath();
- }
+ if (firefoxes.length > 1 && "firefox-bin".equals(firefoxes[1].getName())) {
+ browser = "*firefox " + firefoxes[1].getPath();
+ } else if (firefoxes.length > 0){
+ browser = "*firefox " + firefoxes[0].getPath();
+ }
}
}
}
17 years, 3 months
JBoss Rich Faces SVN: r12257 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-13 11:59:19 -0500 (Tue, 13 Jan 2009)
New Revision: 12257
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
Log:
refactored the thread + NPE fix
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java 2009-01-13 16:54:05 UTC (rev 12256)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/AjaxPushTestBean.java 2009-01-13 16:59:19 UTC (rev 12257)
@@ -17,31 +17,31 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ */
package org.ajax4jsf.bean;
import java.util.Date;
import java.util.EventListener;
import java.util.EventObject;
+import java.util.concurrent.atomic.AtomicInteger;
import org.ajax4jsf.event.PushEventListener;
-public class AjaxPushTestBean implements Runnable {
+public class AjaxPushTestBean {
private boolean enabled = false;
- private Date startDate;
-
private PushEventListener listener;
- private Thread thread;
+ private EventGenerator generator;
- private int eventsSent = 0;
-
private String content = "content";
+ private final Object lock = new Object();
+
/**
* Gets value of content field.
+ *
* @return value of content field
*/
public String getContent() {
@@ -50,7 +50,9 @@
/**
* Set a new value for content field.
- * @param content a new value for content field
+ *
+ * @param content
+ * a new value for content field
*/
public void setContent(String content) {
this.content = content;
@@ -58,60 +60,41 @@
/**
* Gets value of eventsSent field.
+ *
* @return value of eventsSent field
*/
public int getEventsSent() {
- return eventsSent;
+ EventGenerator generator = getGenerator();
+ return generator != null ? generator.getEventsSent() : 0;
}
- /**
- * Set a new value for eventsSent field.
- * @param eventsSent a new value for eventsSent field
- */
- public void setEventsSent(int eventsSent) {
- this.eventsSent = eventsSent;
- }
-
public void addListener(EventListener listener) {
- synchronized (listener) {
+ synchronized (lock) {
if (this.listener != listener) {
this.listener = (PushEventListener) listener;
}
}
}
- public void run() {
- while (thread != null) {
- try {
- long left = System.currentTimeMillis() - startDate.getTime();
- if (left >= 60000) {
- stop();
- }
- listener.onEvent(new EventObject(this));
- eventsSent++;
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- e.printStackTrace();
+ public void start() {
+ synchronized (lock) {
+ if (generator == null && listener != null) {
+ generator = new EventGenerator(listener, 60000);
+ Thread thread = new Thread(generator);
+ thread.setDaemon(true);
+ thread.start();
+ setEnabled(true);
}
}
}
- public void start() {
- if (thread == null) {
- thread = new Thread(this);
- thread.setDaemon(true);
- thread.start();
- startDate = new Date();
- setEnabled(true);
- }
- }
-
public void stop() {
- if (thread != null) {
- startDate = null;
- eventsSent = 0;
- setEnabled(false);
- thread = null;
+ synchronized (lock) {
+ if (generator != null) {
+ generator.stop();
+ setEnabled(false);
+ generator = null;
+ }
}
}
@@ -127,4 +110,55 @@
stop();
start();
}
+
+ private EventGenerator getGenerator() {
+ return generator;
+ }
+
+ private static class EventGenerator implements Runnable {
+
+ private final PushEventListener listener;
+
+ private final long time;
+
+ private AtomicInteger eventsSent = new AtomicInteger(0);
+
+ private volatile boolean stopped;
+
+ public EventGenerator(PushEventListener listener, long time) {
+ this.listener = listener;
+ this.time = time;
+ }
+
+ public void stop() {
+ stopped = true;
+ synchronized (this) {
+ notify();
+ }
+ }
+
+ public void run() {
+ Date startDate = new Date();
+ while (true) {
+ try {
+ long left = System.currentTimeMillis() - startDate.getTime();
+ if (left >= time || stopped) {
+ break;
+ }
+ listener.onEvent(new EventObject(this));
+ eventsSent.incrementAndGet();
+ synchronized (this) {
+ wait(500);
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public int getEventsSent() {
+ return eventsSent.get();
+ }
+ }
+
}
17 years, 3 months
JBoss Rich Faces SVN: r12256 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-13 11:54:05 -0500 (Tue, 13 Jan 2009)
New Revision: 12256
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
renderAutoTestPage fix
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 13:55:21 UTC (rev 12255)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-13 16:54:05 UTC (rev 12256)
@@ -325,14 +325,16 @@
selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
setParentId(template.getPrefix());
- runScript("loadTemplate('" + template + "');", false);
+ //runScript("loadTemplate('" + template + "');", false);
+ runScript("loadTemplate('" + template + "', '" + resetMethodName + "');", false);
waitForPageToLoad();
checkPageRendering(); // At the first we check if page has been
// rendered
checkJSError(); // At the second we check if JS errors occurred
- reRenderForm(resetMethodName); // ReRender component
+ //reRenderForm(resetMethodName); // ReRender component
+ reRenderForm(); // ReRender component
checkPageRendering(); // Check all again
checkJSError();
17 years, 3 months
JBoss Rich Faces SVN: r12255 - trunk/test-applications/seamApp/web/src/main/webapp/ExtendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-01-13 08:55:21 -0500 (Tue, 13 Jan 2009)
New Revision: 12255
Modified:
trunk/test-applications/seamApp/web/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml
Log:
page correction
Modified: trunk/test-applications/seamApp/web/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml 2009-01-13 13:51:48 UTC (rev 12254)
+++ trunk/test-applications/seamApp/web/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml 2009-01-13 13:55:21 UTC (rev 12255)
@@ -68,16 +68,24 @@
first="#{extendedDataTableControlBean.first}"
frame="#{extendedDataTableControlBean.frame}"
groupingColumn="#{extendedDataTableControlBean.groupingColumn}"
- rendered="#{extendedDataTableControlBean.rendered}"
- sortPriority="#{extendedDataTableControlBean.sortPriority}">
+ rendered="#{extendedDataTableControlBean.rendered}">
+
+ <rich:column id="id" headerClass="dataTableHeader" width="25%"
+ label="First name" sortable="true" sortBy="#{patient.id}"
+ filterBy="#{patient.id}" filterEvent="onkeyup">
+ <f:facet name="header">
+ <h:outputText value="id" />
+ </f:facet>
+ <h:outputText value="#{patient.id}" />
+ </rich:column>
<rich:column id="firstName" headerClass="dataTableHeader" width="25%"
label="First name" sortable="true" sortBy="#{patient.firstName}"
- filterBy="#{patient.firstName}" filterEvent="onkeyup">
+ filterBy="#{patient.firstName}" filterEvent="onblur">
<f:facet name="header">
<h:outputText value="First name" />
</f:facet>
<h:outputText id="text" value="#{patient.firstName}">
- <rich:toolTip value="sasasasasasa" />
+ <rich:toolTip value="#{patient.firstName}" />
</h:outputText>
</rich:column>
<rich:column id="lastName" headerClass="dataTableHeader" width="25%"
@@ -89,14 +97,14 @@
<h:outputText value="#{patient.lastName}" />
</rich:column>
<rich:column id="admissionDate" headerClass="dataTableHeader"
- width="50%" label="Admission name" sortable="true"
+ width="25%" label="Admission name" sortable="true"
sortBy="#{patient.admissionDate}">
<f:facet name="header">
<h:outputText value="Admission name" />
</f:facet>
<h:outputText value="#{patient.admissionDate}" />
</rich:column>
- <a4j:support event="onselectionchange"
+ <a4j:support event="onselectionchange"
action="#{extendedDataTableBean.takeSelection}"
reRender="selectedPatients">
</a4j:support>
17 years, 3 months
JBoss Rich Faces SVN: r12254 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/tabPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-13 08:51:48 -0500 (Tue, 13 Jan 2009)
New Revision: 12254
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
RF-5547
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2009-01-13 13:40:22 UTC (rev 12253)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/RichPanelTestBean.java 2009-01-13 13:51:48 UTC (rev 12254)
@@ -21,193 +21,215 @@
package org.ajax4jsf.bean;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.faces.event.ActionEvent;
public class RichPanelTestBean {
- private String value;
+ private String value;
- private int value2;
+ private int value2;
- private Object panelValue;
+ private Object panelValue;
- private Object panelValue2;
+ private Object panelValue2;
- private String itemAction;
+ private String itemAction;
- private boolean rendered;
+ private boolean rendered;
- private String content;
+ private String content;
- private String switchType = "server";
-
- private String selectedTab;
+ private String switchType = "server";
- public RichPanelTestBean() {
- reset();
- }
-
- public void reset() {
- value = "";
- value2 = 0;
- rendered = true;
- content = "content";
- }
+ private String selectedTab = "tab1";
- /**
- * Gets value of switchType field.
- * @return value of switchType field
- */
- public String getSwitchType() {
- return switchType;
- }
+ private Map<String, String> inputs = new HashMap<String, String>();
- /**
- * Set a new value for switchType field.
- * @param switchType a new value for switchType field
- */
- public void setSwitchType(String switchType) {
- this.switchType = switchType;
- }
+ public RichPanelTestBean() {
+ value = "";
+ value2 = 0;
+ rendered = true;
+ content = "content";
+ }
- public String getValue() {
- return value;
- }
+ public void reset() {
+ value = "";
+ value2 = 0;
+ rendered = true;
+ content = "content";
+ selectedTab = "tab1";
+ }
- public void setValue(String value) {
- this.value = value;
- }
+ public void reset(ActionEvent event) {
+ reset();
+ }
- public int getValue2() {
- return value2;
- }
+ /**
+ * Gets value of switchType field.
+ *
+ * @return value of switchType field
+ */
+ public String getSwitchType() {
+ return switchType;
+ }
- public void setValue2(int value2) {
- this.value2 = value2;
- }
+ /**
+ * Set a new value for switchType field.
+ *
+ * @param switchType
+ * a new value for switchType field
+ */
+ public void setSwitchType(String switchType) {
+ this.switchType = switchType;
+ }
- public Object getPanelValue() {
- return panelValue;
- }
+ public String getValue() {
+ return value;
+ }
- public void setPanelValue(Object panelValue) {
- this.panelValue = panelValue;
- }
+ public void setValue(String value) {
+ this.value = value;
+ }
- public Object getPanelValue2() {
- return panelValue2;
- }
+ public int getValue2() {
+ return value2;
+ }
- public void setPanelValue2(Object panelValue2) {
- this.panelValue2 = panelValue2;
- }
+ public void setValue2(int value2) {
+ this.value2 = value2;
+ }
- /**
- * Gets value of content field.
- * @return value of content field
- */
- public String getContent() {
- return content;
- }
+ public Object getPanelValue() {
+ return panelValue;
+ }
- /**
- * Set a new value for content field.
- * @param content a new value for content field
- */
- public void setContent(String content) {
- this.content = content;
- }
+ public void setPanelValue(Object panelValue) {
+ this.panelValue = panelValue;
+ }
- /**
- * Gets value of itemAction field.
- *
- * @return value of itemAction field
- */
- public String getItemAction() {
- return itemAction;
- }
+ public Object getPanelValue2() {
+ return panelValue2;
+ }
- /**
- * Set a new value for itemAction field.
- *
- * @param itemAction
- * a new value for itemAction field
- */
- public void setItemAction(String itemAction) {
- this.itemAction = itemAction;
- }
+ public void setPanelValue2(Object panelValue2) {
+ this.panelValue2 = panelValue2;
+ }
- /**
- * Gets value of rendered field.
- * @return value of rendered field
- */
- public boolean isRendered() {
- return rendered;
- }
+ /**
+ * Gets value of content field.
+ *
+ * @return value of content field
+ */
+ public String getContent() {
+ return content;
+ }
- /**
- * Set a new value for rendered field.
- * @param rendered a new value for rendered field
- */
- public void setRendered(boolean rendered) {
- this.rendered = rendered;
- }
+ /**
+ * Set a new value for content field.
+ *
+ * @param content
+ * a new value for content field
+ */
+ public void setContent(String content) {
+ this.content = content;
+ }
- public void actionListener(ActionEvent event) {
- this.value = event.getComponent().getId();
- }
+ /**
+ * Gets value of itemAction field.
+ *
+ * @return value of itemAction field
+ */
+ public String getItemAction() {
+ return itemAction;
+ }
- public void itemActionServer() {
- setItemAction("server");
- }
+ /**
+ * Set a new value for itemAction field.
+ *
+ * @param itemAction
+ * a new value for itemAction field
+ */
+ public void setItemAction(String itemAction) {
+ this.itemAction = itemAction;
+ }
- public void itemActionAjax() {
- setItemAction("ajax");
- }
+ /**
+ * Gets value of rendered field.
+ *
+ * @return value of rendered field
+ */
+ public boolean isRendered() {
+ return rendered;
+ }
- public void itemActionNone() {
- setItemAction("NOT none");
- }
+ /**
+ * Set a new value for rendered field.
+ *
+ * @param rendered
+ * a new value for rendered field
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
- public String increment() {
- if (4 == this.value2) {
- this.value2 = 0;
- }
- this.value2++;
- return null;
- }
+ public void actionListener(ActionEvent event) {
+ this.value = event.getComponent().getId();
+ }
- public void hide() {
- rendered = false;
- }
-
- public void reset2Server() {
- cleanValues();
- content = "";
- switchType = "server";
- }
+ public void itemActionServer() {
+ setItemAction("server");
+ }
- public void reset2Ajax() {
- cleanValues();
- content = "";
- switchType = "ajax";
- }
+ public void itemActionAjax() {
+ setItemAction("ajax");
+ }
- public void reset2Client() {
- cleanValues();
- content = "";
- switchType = "client";
- }
+ public void itemActionNone() {
+ setItemAction("NOT none");
+ }
- public void cleanValues() {
- value = "";
- value2 = 0;
- panelValue = null;
- panelValue2 = null;
- itemAction = "";
- rendered = true;
- content = "content";
- }
+ public String increment() {
+ if (4 == this.value2) {
+ this.value2 = 0;
+ }
+ this.value2++;
+ return null;
+ }
+ public void hide() {
+ rendered = false;
+ }
+
+ public void reset2Server() {
+ cleanValues();
+ content = "";
+ switchType = "server";
+ }
+
+ public void reset2Ajax() {
+ cleanValues();
+ content = "";
+ switchType = "ajax";
+ }
+
+ public void reset2Client() {
+ cleanValues();
+ content = "";
+ switchType = "client";
+ }
+
+ public void cleanValues() {
+ value = "";
+ value2 = 0;
+ panelValue = null;
+ panelValue2 = null;
+ itemAction = "";
+ rendered = true;
+ content = "content";
+ }
+
/**
* @return the selectedTab
*/
@@ -216,11 +238,26 @@
}
/**
- * @param selectedTab the selectedTab to set
+ * @param selectedTab
+ * the selectedTab to set
*/
public void setSelectedTab(String selectedTab) {
this.selectedTab = selectedTab;
}
-
-
+
+ /**
+ * @return the inputs
+ */
+ public Map<String, String> getInputs() {
+ return inputs;
+ }
+
+ /**
+ * @param inputs
+ * the inputs to set
+ */
+ public void setInputs(Map<String, String> inputs) {
+ this.inputs = inputs;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-13 13:40:22 UTC (rev 12253)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-13 13:51:48 UTC (rev 12254)
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ */
package org.richfaces.testng;
import org.ajax4jsf.template.Template;
@@ -28,52 +28,150 @@
import com.thoughtworks.selenium.SeleniumException;
public class TabPanelTest extends SeleniumTestBase {
+
+ static final String FORM_ID = "_form:";
- static final String RESET_METHOD = "#{panelBean.reset}";
+ static final String RESET_METHOD = "#{panelBean.reset}";
- @Test
- public void testRichTabPanelComponent(Template template) {
- renderPage(template, RESET_METHOD);
- String parentId = getParentId() + "_form:";
- String linkId = parentId + "tab2_lbl";
- String tabId1 = parentId + "tab1";
- String tabId2 = parentId + "tab2";
- String tabId4 = parentId + "tab4";
- String inputId = parentId + "_value";
- //String outputId = parentId + "_value2";
+ @Test
+ public void testRichTabPanelComponent(Template template) {
+ renderPage(template, RESET_METHOD);
+ String parentId = getParentId() + FORM_ID;
+ String linkId = parentId + "tab2_lbl";
+ String tabId1 = parentId + "tab1";
+ String tabId2 = parentId + "tab2";
+ String tabId4 = parentId + "tab4";
- writeStatus("Click on tab2");
- clickById(linkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "tab2");
- AssertTextEquals(tabId2, "Tab two");
- AssertVisible(tabId2);
- AssertNotVisible(tabId4);
-
- writeStatus("Click on tab1");
- linkId = parentId + "tab1_lbl";
- clickCommandAndWait(linkId);
- AssertValueEquals(inputId, "tab1");
- AssertTextEquals(tabId1, "Tab one");
- AssertVisible(tabId1);
- AssertNotVisible(tabId4);
-
- writeStatus("Click on tab3");
- linkId = parentId + "tab3_lbl";
- clickById(linkId);
- AssertValueEquals(inputId, "tab1");
- AssertVisible(tabId1);
+ writeStatus("Click on tab2");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertTextEquals(tabId2, "Tab two");
+ AssertVisible(tabId2);
+ AssertNotVisible(tabId4);
- writeStatus("Click on tab4");
- linkId = parentId + "tab4_lbl";
- clickById(linkId);
- AssertVisible(tabId4);
- AssertNotVisible(tabId1);
- }
+ writeStatus("Click on tab1");
+ linkId = parentId + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertTextEquals(tabId1, "Tab one");
+ AssertVisible(tabId1);
+ AssertNotVisible(tabId4);
- @Override
- public String getTestUrl() {
- return "pages/tabPanel/tabPanelTest.xhtml";
- }
+ writeStatus("Click on tab3");
+ linkId = parentId + "tab3_lbl";
+ clickById(linkId);
+ AssertVisible(tabId1);
+ writeStatus("Click on tab4");
+ linkId = parentId + "tab4_lbl";
+ clickById(linkId);
+ AssertVisible(tabId4);
+ AssertNotVisible(tabId1);
+ }
+
+ @Test
+ public void testSubmissionModesAndListeners(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ String parentId = getParentId();
+
+ testListener(parentId);
+ testSubmissionModes(parentId);
+
+ }
+
+ private void testListener (String parentId) {
+
+ String linkId = parentId + FORM_ID + "tab2_lbl";
+ String inputId = parentId + FORM_ID + "_value";
+
+ writeStatus("Click on tab2");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertTextEquals(inputId, "tab2", "Listener for the second tab [ajax mode] has not been called");
+
+ writeStatus("Click on tab1");
+ linkId = parentId + FORM_ID + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertTextEquals(inputId, "tab1", "Listener for the first tab [server mode] has not been called");
+ }
+
+
+ private void testSubmissionModes(String parentId) {
+ String tabId1 = parentId + FORM_ID + "tab1";
+ String tabId2 = parentId + FORM_ID + "tab2";
+ String tabId4 = parentId + FORM_ID + "tab4";
+
+ reset(parentId);
+
+ // Set input for the first tab
+ setValueById(tabId1 + "_input", "text1");
+ clickById(tabId2 + "_lbl");
+ waitForAjaxCompletion();
+ checkDecodes(parentId, "text1", "", "");
+
+
+ // Set input for the second and 4th tabs
+ setValueById(tabId2 + "_input", "text2");
+ setValueById(tabId4 + "_input", "text4");
+ clickById(tabId1 + "_lbl");
+ waitForPageToLoad();
+ checkDecodes(parentId, "text1", "text2", "text4");
+
+ // Reset model. Swtich to tyhe first tab
+ reset(parentId);
+
+ // Switch to 4th tab
+ clickById(tabId4 + "_lbl");
+ setValueById(tabId4 + "_input", "text");
+ submit(parentId);
+ AssertVisible(tabId4, "Tab4 (client) should be kept as active after form submition");
+ checkDecodes(parentId, "", "", "text");
+
+
+ // Switch to 2nd tab
+ clickById(tabId2 + "_lbl");
+ waitForAjaxCompletion();
+ setValueById(tabId4 + "_input", "text4");
+ setValueById(tabId2 + "_input", "text2");
+ ajaxSubmit(parentId);
+ checkDecodes(parentId, "", "text2", "text4");
+
+
+ }
+
+ private void checkDecodes(String parentId, String input1, String input2, String input4) {
+ String inputsId = parentId + FORM_ID + "_inputs";
+ String inputs = getTextById(inputsId);
+
+ if (!inputs.contains("tab1=" + input1)) {
+ Assert.fail("Decode or update model for the first tab processed incorrect. The model should contain ['"+input1+"'] value submitted from the tab");
+ }
+ if (!inputs.contains("tab2=" + input2)) {
+ Assert.fail("Decode or update model for the second tab processed incorrect. The model should contain ['"+input2+"'] value submitted from the tab");
+ }
+ if (!inputs.contains("tab4=" + input4)) {
+ Assert.fail("Decode or update model for the 4th tab processed incorrect. The model should contain ['"+input4+"'] value submitted from the tab");
+ }
+ }
+
+ private void submit(String parentId) {
+ String commandId = parentId + FORM_ID + "submit";
+ clickCommandAndWait(commandId);
+ }
+
+ private void ajaxSubmit(String parentId) {
+ String commandId = parentId + FORM_ID + "ajaxSubmit";
+ clickAjaxCommandAndWait(commandId);
+ }
+
+ private void reset(String parentId) {
+ String commandId = parentId + "controls:reset";
+ clickCommandAndWait(commandId);
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/tabPanel/tabPanelTest.xhtml";
+ }
+
}
17 years, 3 months
JBoss Rich Faces SVN: r12253 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-01-13 08:40:22 -0500 (Tue, 13 Jan 2009)
New Revision: 12253
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-4664
correct a style listing
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2009-01-13 13:27:43 UTC (rev 12252)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2009-01-13 13:40:22 UTC (rev 12253)
@@ -1276,7 +1276,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="CSS"><![CDATA[...
-.richfacesSkin a.mceButton span, .richfacesSkin a.mceButton img{
+.richfacesSkin .mceButton {
border: 1px solid red;
}
...]]></programlisting>
17 years, 3 months
JBoss Rich Faces SVN: r12252 - trunk/test-applications/facelets/src/main/webapp/ExtendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-01-13 08:27:43 -0500 (Tue, 13 Jan 2009)
New Revision: 12252
Modified:
trunk/test-applications/facelets/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml
Log:
page correction
Modified: trunk/test-applications/facelets/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml 2009-01-13 13:21:52 UTC (rev 12251)
+++ trunk/test-applications/facelets/src/main/webapp/ExtendedDataTable/ExtendedDataTable.xhtml 2009-01-13 13:27:43 UTC (rev 12252)
@@ -68,11 +68,10 @@
first="#{extendedDataTableControlBean.first}"
frame="#{extendedDataTableControlBean.frame}"
groupingColumn="#{extendedDataTableControlBean.groupingColumn}"
- rendered="#{extendedDataTableControlBean.rendered}"
- sortPriority="#{extendedDataTableControlBean.sortPriority}">
+ rendered="#{extendedDataTableControlBean.rendered}">
<rich:column id="id" headerClass="dataTableHeader" width="25%"
- label="First name" sortable="true" sortBy="#{patient.firstName}"
+ label="First name" sortable="true" sortBy="#{patient.id}"
filterBy="#{patient.id}" filterEvent="onkeyup">
<f:facet name="header">
<h:outputText value="id" />
@@ -98,7 +97,7 @@
<h:outputText value="#{patient.lastName}" />
</rich:column>
<rich:column id="admissionDate" headerClass="dataTableHeader"
- width="50%" label="Admission name" sortable="true"
+ width="25%" label="Admission name" sortable="true"
sortBy="#{patient.admissionDate}">
<f:facet name="header">
<h:outputText value="Admission name" />
17 years, 3 months
JBoss Rich Faces SVN: r12251 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2009-01-13 08:21:52 -0500 (Tue, 13 Jan 2009)
New Revision: 12251
Added:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.GA.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.GA.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.GA.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months