JBoss Rich Faces SVN: r22884 - modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:18:03 -0500 (Sun, 06 Nov 2011)
New Revision: 22884
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml
Log:
RFPL-1233: add client filtering example into autocomplete
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml 2011-11-07 01:17:54 UTC (rev 22883)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml 2011-11-07 01:18:03 UTC (rev 22884)
@@ -37,24 +37,30 @@
</ui:define>
<ui:define name="head">
- <script>
- function clientFilterFunction(subString, value) {
- if (subString.length >= 1) {
- if(value.indexOf(subString)!=-1)
- return true;
- } else return false;
+ <script type="text/javascript">
+ /* function filtering by string occurence in state and name */
+ function customClientFilterFunction(subString, value) {
+
+ if (subString.length >= 2) {
+ if(value.indexOf(subString)!=-1) {
+ // console.log(' # ' + subString + ' matches on ' + value);
+ return true;
+ }
+ } else return false;
};
+
</script>
</ui:define>
<ui:define name="component">
+
<rich:autocomplete id="autocomplete"
- autocompleteList="#{richAutocompleteBean.capitals}"
+ autocompleteList="#{richAutocompleteBean.capitals}"
autofill="#{richAutocompleteBean.attributes['autofill'].value}"
clientFilterFunction="#{richAutocompleteBean.attributes['clientFilterFunction'].value}"
converterMessage="#{richAutocompleteBean.attributes['converterMessage'].value}"
disabled="#{richAutocompleteBean.attributes['disabled'].value}"
- filterFunction="#{richAutocompleteBean.attributes['filterFunction'].value}"
+ fetchValue="#{capital.state}"
immediate="#{richAutocompleteBean.attributes['immediate'].value}"
inputClass="#{richAutocompleteBean.attributes['inputClass'].value}"
layout="#{richAutocompleteBean.attributes['layout'].value}"
@@ -99,7 +105,9 @@
validatorMessage="#{richAutocompleteBean.attributes['validatorMessage'].value}"
value="#{richAutocompleteBean.attributes['value'].value}"
valueChangeListener="#{richBean.valueChangeListener}"
+ var="capital"
>
+ #{capital.name} of #{capital.state}
<a4j:ajax event="change"
render="#{richAutocompleteBean.ajaxAttributes['render'].value}"
13 years, 1 month
JBoss Rich Faces SVN: r22883 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:54 -0500 (Sun, 06 Nov 2011)
New Revision: 22883
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
Log:
RFPL-1233: remove filter function from bean
Seems that filterFunction on autocomplete component was mistake. There is only clientFilterFunction and autocompleteMethod, and no another method on backing bean is needed. So remove this function from my beam as it has no reason
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-11-07 01:17:41 UTC (rev 22882)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-11-07 01:17:54 UTC (rev 22883)
@@ -157,10 +157,6 @@
return result;
}
- public void filterFunction(String prefix, Object value) {
- // not known how this function should looks like, waiting for dev
- }
-
public void setCapitals(List<Capital> capitals) {
this.capitals = capitals;
}
13 years, 1 month
JBoss Rich Faces SVN: r22882 - modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:41 -0500 (Sun, 06 Nov 2011)
New Revision: 22882
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml
Log:
RFPL-1233: add filtering example page into list.xhtml
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml 2011-11-07 01:17:33 UTC (rev 22881)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/list.xhtml 2011-11-07 01:17:41 UTC (rev 22882)
@@ -47,6 +47,10 @@
<metamer:testPageLink id="csv" outcome="csv" value="Client Side Validation">
Simple page that contains some <b>rich:autocomplete</b>s testing client-side validation..
</metamer:testPageLink>
+
+ <metamer:testPageLink id="filtering" outcome="filtering" value="Filtering">
+ Simple page that contains <b>rich:autocomplete</b> with filtering functions.
+ </metamer:testPageLink>
</ui:define>
13 years, 1 month
JBoss Rich Faces SVN: r22881 - modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:33 -0500 (Sun, 06 Nov 2011)
New Revision: 22881
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml
Log:
RFPL-1233: add filtering example for autocomplete
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/filtering.xhtml 2011-11-07 01:17:33 UTC (rev 22881)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+ <script>
+ function clientFilterFunction(subString, value) {
+ if (subString.length >= 1) {
+ if(value.indexOf(subString)!=-1)
+ return true;
+ } else return false;
+ };
+ </script>
+ </ui:define>
+
+ <ui:define name="component">
+ <rich:autocomplete id="autocomplete"
+ autocompleteList="#{richAutocompleteBean.capitals}"
+ autofill="#{richAutocompleteBean.attributes['autofill'].value}"
+ clientFilterFunction="#{richAutocompleteBean.attributes['clientFilterFunction'].value}"
+ converterMessage="#{richAutocompleteBean.attributes['converterMessage'].value}"
+ disabled="#{richAutocompleteBean.attributes['disabled'].value}"
+ filterFunction="#{richAutocompleteBean.attributes['filterFunction'].value}"
+ immediate="#{richAutocompleteBean.attributes['immediate'].value}"
+ inputClass="#{richAutocompleteBean.attributes['inputClass'].value}"
+ layout="#{richAutocompleteBean.attributes['layout'].value}"
+ minChars="#{richAutocompleteBean.attributes['minChars'].value}"
+ mode="#{richAutocompleteBean.attributes['mode'].value}"
+ onbeforedomupdate="#{richAutocompleteBean.attributes['onbeforedomupdate'].value}"
+ onbegin="#{richAutocompleteBean.attributes['onbegin'].value}"
+ onblur="#{richAutocompleteBean.attributes['onblur'].value}"
+ onchange="#{richAutocompleteBean.attributes['onchange'].value}"
+ onclick="#{richAutocompleteBean.attributes['onclick'].value}"
+ oncomplete="#{richAutocompleteBean.attributes['oncomplete'].value}"
+ ondblclick="#{richAutocompleteBean.attributes['ondblclick'].value}"
+ onerror="#{richAutocompleteBean.attributes['onerror'].value}"
+ onfocus="#{richAutocompleteBean.attributes['onfocus'].value}"
+ onkeydown="#{richAutocompleteBean.attributes['onkeydown'].value}"
+ onkeypress="#{richAutocompleteBean.attributes['onkeypress'].value}"
+ onkeyup="#{richAutocompleteBean.attributes['onkeyup'].value}"
+ onlistclick="#{richAutocompleteBean.attributes['onlistclick'].value}"
+ onlistdblclick="#{richAutocompleteBean.attributes['onlistdblclick'].value}"
+ onlistkeydown="#{richAutocompleteBean.attributes['onlistkeydown'].value}"
+ onlistkeypress="#{richAutocompleteBean.attributes['onlistkeypress'].value}"
+ onlistkeyup="#{richAutocompleteBean.attributes['onlistkeyup'].value}"
+ onlistmousedown="#{richAutocompleteBean.attributes['onlistmousedown'].value}"
+ onlistmousemove="#{richAutocompleteBean.attributes['onlistmousemove'].value}"
+ onlistmouseout="#{richAutocompleteBean.attributes['onlistmouseout'].value}"
+ onlistmouseover="#{richAutocompleteBean.attributes['onlistmouseover'].value}"
+ onlistmouseup="#{richAutocompleteBean.attributes['onlistmouseup'].value}"
+ onmousedown="#{richAutocompleteBean.attributes['onmousedown'].value}"
+ onmousemove="#{richAutocompleteBean.attributes['onmousemove'].value}"
+ onmouseout="#{richAutocompleteBean.attributes['onmouseout'].value}"
+ onmouseover="#{richAutocompleteBean.attributes['onmouseover'].value}"
+ onmouseup="#{richAutocompleteBean.attributes['onmouseup'].value}"
+ onselectitem="#{richAutocompleteBean.attributes['onselectitem'].value}"
+ popupClass="#{richAutocompleteBean.attributes['popupClass'].value}"
+ rendered="#{richAutocompleteBean.attributes['rendered'].value}"
+ required="#{richAutocompleteBean.attributes['required'].value}"
+ requiredMessage="#{richAutocompleteBean.attributes['requiredMessage'].value}"
+ selectFirst="#{richAutocompleteBean.attributes['selectFirst'].value}"
+ selectedItemClass="#{richAutocompleteBean.attributes['selectedItemClass'].value}"
+ showButton="#{richAutocompleteBean.attributes['showButton'].value}"
+ tokens="#{richAutocompleteBean.attributes['tokens'].value}"
+ validatorMessage="#{richAutocompleteBean.attributes['validatorMessage'].value}"
+ value="#{richAutocompleteBean.attributes['value'].value}"
+ valueChangeListener="#{richBean.valueChangeListener}"
+ >
+
+ <a4j:ajax event="change"
+ render="#{richAutocompleteBean.ajaxAttributes['render'].value}"
+ execute="#{richAutocompleteBean.ajaxAttributes['execute'].value}"
+ listener="#{richBean.changeEventListener}" />
+
+ <a4j:ajax event="selectitem" render="output"
+ listener="#{richBean.actionListener}"
+ />
+
+ </rich:autocomplete>
+
+ <br/><br/>
+ Your selection: <h:outputText id="output" value="#{richAutocompleteBean.attributes['value'].value}"/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richAutocompleteBean.attributes}" id="attributes" />
+ <metamer:attributes value="#{richAutocompleteBean.ajaxAttributes}" id="ajaxAttributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
13 years, 1 month
JBoss Rich Faces SVN: r22880 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:24 -0500 (Sun, 06 Nov 2011)
New Revision: 22880
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
Log:
RFPL-1633: add filterMethod into RichAutocompletebean
This function is not working right now, since it is not know how this function should looks like and it is not working at all since is overriden by clientFilterFunction attribute in component rendered.
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-11-07 01:17:13 UTC (rev 22879)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichAutocompleteBean.java 2011-11-07 01:17:24 UTC (rev 22880)
@@ -156,6 +156,10 @@
}
return result;
}
+
+ public void filterFunction(String prefix, Object value) {
+ // not known how this function should looks like, waiting for dev
+ }
public void setCapitals(List<Capital> capitals) {
this.capitals = capitals;
@@ -196,4 +200,8 @@
this.value4 = value4;
}
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
}
13 years, 1 month
JBoss Rich Faces SVN: r22879 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:13 -0500 (Sun, 06 Nov 2011)
New Revision: 22879
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteFormatting.java
Log:
RFPL-1545: add test for autocomplete with @fetchValue
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteFormatting.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteFormatting.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteFormatting.java 2011-11-07 01:17:13 UTC (rev 22879)
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richAutocomplete;
+
+import static org.jboss.test.selenium.RequestTypeModelGuard.guardXhr;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertFalse;
+
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.validation.constraints.AssertFalse;
+
+import org.jboss.test.selenium.utils.URLUtils;
+import org.richfaces.tests.metamer.bean.Model;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.model.Autocomplete;
+import org.richfaces.tests.metamer.model.Capital;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * Test for example with formatted suggestions on page faces/components/richAutocomplete/autocomplete.xhtml
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ *
+ * @version $Revision$
+ */
+public class TestAutocompleteFormatting extends AbstractMetamerTest {
+
+ AutocompleteAttributes attributes = new AutocompleteAttributes();
+ Autocomplete autocomplete = new Autocomplete();
+ StringBuilder partialInput;
+
+ List<Capital> capitals = Model.unmarshallCapitals();
+
+ @Inject
+ @Use(booleans = { true, false })
+ Boolean autofill;
+
+ @Inject
+ @Use(booleans = { true, false })
+ Boolean selectFirst;
+
+ @Override
+ public URL getTestUrl() {
+ return URLUtils.buildUrl(contextPath, "faces/components/richAutocomplete/fetchValueAttr.xhtml");
+ }
+
+ @BeforeMethod
+ public void prepareProperties() {
+ attributes.setAutofill(autofill);
+ attributes.setSelectFirst(selectFirst);
+ if (autofill == null) {
+ autofill = false;
+ }
+ if (selectFirst == null) {
+ selectFirst = false;
+ }
+ autocomplete.clearInputValue();
+ }
+
+ /**
+ * This should test combination of @var and @fetchValue attributes of autocomplete
+ */
+ @Test
+ public void testFormatting() {
+ assertFalse(autocomplete.isCompletionVisible());
+ typePrefix("ala");
+ assertTrue(autocomplete.isCompletionVisible());
+ confirm();
+ assertFalse(autocomplete.isCompletionVisible());
+ assertTrue(autocomplete.getInputText().toLowerCase().startsWith(getExpectedStateForPrefix().toLowerCase()));
+ }
+
+ public void typePrefix(String wholeInput) {
+ partialInput = new StringBuilder(autocomplete.getInputText());
+
+ for (int i = 0; i < wholeInput.length(); i++) {
+ String chr = String.valueOf(wholeInput.charAt(i));
+
+ guardXhr(autocomplete).typeKeys(chr);
+ partialInput.append(chr);
+
+ assertEquals(autocomplete.getInputText(), getExpectedStateForPrefix());
+ assertEquals(autocomplete.getSelectedOptionIndex(), getExpectedSelectedOptionIndex());
+ }
+ }
+
+ public String getExpectedStateForPrefix() {
+ if (selectFirst && autofill && partialInput.length() > 0) {
+ return getStatesByPrefix(partialInput.toString()).get(0).toLowerCase();
+ }
+
+ return partialInput.toString();
+ }
+
+ public String getExpectedCompletionForPrefix() {
+ if (selectFirst && autofill && partialInput.length() > 0) {
+ return getCompletionByPrefix(partialInput.toString()).get(0).toLowerCase();
+ }
+
+ return partialInput.toString();
+ }
+
+ public List<String> getStatesByPrefix(String prefix) {
+ List<String> states = new LinkedList<String>();
+
+ for (Capital cap : capitals) {
+ if (cap.getState().toLowerCase().startsWith(prefix)) {
+ states.add(cap.getState());
+ }
+ }
+
+ return states;
+ }
+
+ public List<String> getCompletionByPrefix(String prefix) {
+ List<String> states = new LinkedList<String>();
+
+ for (Capital cap : capitals) {
+ if (cap.getState().toLowerCase().startsWith(prefix)) {
+ states.add(cap.getState() + " [" + cap.getName() + "]");
+ }
+ }
+
+ return states;
+ }
+
+ public int getExpectedSelectedOptionIndex() {
+ return (selectFirst && partialInput.length() > 0) ? 0 : -1;
+ }
+
+ public void confirm() {
+ autocomplete.confirmByKeys();
+ autocomplete.waitForCompletionVisible();
+ }
+
+ public Boolean getAutofill() {
+ return autofill;
+ }
+
+ public void setAutofill(Boolean autofill) {
+ this.autofill = autofill;
+ }
+
+ public Boolean getSelectFirst() {
+ return selectFirst;
+ }
+
+ public void setSelectFirst(Boolean selectFirst) {
+ this.selectFirst = selectFirst;
+ }
+}
13 years, 1 month
JBoss Rich Faces SVN: r22878 - modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:17:03 -0500 (Sun, 06 Nov 2011)
New Revision: 22878
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
Log:
RFPL-1545: remove @fetchValue and @var from autocomplete basic example
This was necessary step since casused unreliable behavior on autocomplete (after value update in any attribute, which causes page rerender, autocomplete was no longer able update value typed/selected in output. @var and @fetchValue attributes are used in second example (fetchValueAttr.xhtml), so they are really not necessary here.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-11-07 01:16:52 UTC (rev 22877)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-11-07 01:17:03 UTC (rev 22878)
@@ -44,7 +44,6 @@
converterMessage="#{richAutocompleteBean.attributes['converterMessage'].value}"
disabled="#{richAutocompleteBean.attributes['disabled'].value}"
filterFunction="#{richAutocompleteBean.attributes['filterFunction'].value}"
- fetchValue="#{richAutocompleteBean.attributes['fetchValue'].value}"
immediate="#{richAutocompleteBean.attributes['immediate'].value}"
inputClass="#{richAutocompleteBean.attributes['inputClass'].value}"
layout="#{richAutocompleteBean.attributes['layout'].value}"
@@ -89,7 +88,6 @@
validatorMessage="#{richAutocompleteBean.attributes['validatorMessage'].value}"
value="#{richAutocompleteBean.attributes['value'].value}"
valueChangeListener="#{richBean.valueChangeListener}"
- var="#{richAutocompleteBean.attributes['var'].value}"
>
<a4j:ajax event="change"
13 years, 1 month
JBoss Rich Faces SVN: r22877 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-11-06 20:16:52 -0500 (Sun, 06 Nov 2011)
New Revision: 22877
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
Log:
rfpl-1545: add input cleaning before all new test method
There were seen some values entered in previous test and inpacting init state for next tests. May be it was caused some changes in autocomplete tests or by behavior change in selenium, not sure, but seems to me to be important to fix it at least this way.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2011-11-04 14:26:43 UTC (rev 22876)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2011-11-07 01:16:52 UTC (rev 22877)
@@ -68,6 +68,7 @@
if (selectFirst == null) {
selectFirst = false;
}
+ autocomplete.clearInputValue();
}
@Test
13 years, 1 month
JBoss Rich Faces SVN: r22875 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-11-03 14:22:54 -0400 (Thu, 03 Nov 2011)
New Revision: 22875
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java
Log:
tests for filtering in rich:dataTable and rich:extendedDataTable fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-11-03 16:55:33 UTC (rev 22874)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFilteringTest.java 2011-11-03 18:22:54 UTC (rev 22875)
@@ -48,7 +48,7 @@
private static final String[] FILTER_NAMES = new String[] { "ivan", "Гог", null, "Š" };
private static final String[] FILTER_TITLES = new String[] { "Director", null, "CEO" };
private static final Integer[] FILTER_NUMBER_OF_KIDS = new Integer[] { 2, 100, 0, 5 };
-
+
JQueryLocator selectSex = jq("select");
JQueryLocator inputName = jq("input");
JQueryLocator inputTitle = jq("input");
@@ -56,11 +56,11 @@
JQueryLocator inputNumberOfKids2 = jq("input");
FilteringDataTable filtering = new FilteringDataTable();
-
+
private ExpectedEmployee filterEmployee;
private List<Employee> expectedEmployees;
private int rows;
-
+
@BeforeMethod
public void setup() {
filterEmployee = new ExpectedEmployee();
@@ -137,7 +137,7 @@
filtering.selectName("an");
filterEmployee.name = "an";
-
+
expectedEmployees = filter(EMPLOYEES, getFilter());
dataScroller2.gotoLastPage();
@@ -148,11 +148,11 @@
assertEquals(dataScroller2.getCurrentPage(), lastPage);
assertTrue(dataScroller2.isLastPage());
verifyPageContent(lastPage);
-
+
dataScroller2.gotoFirstPage();
verifyPageContent(1);
}
-
+
public void testFullPageRefresh() {
dataScroller2.setLastPage(dataScroller2.obtainLastPage());
dataScroller2.gotoFirstPage();
@@ -160,7 +160,7 @@
filtering.selectName("an");
filterEmployee.name = "an";
-
+
expectedEmployees = filter(EMPLOYEES, getFilter());
dataScroller2.gotoLastPage();
@@ -171,7 +171,7 @@
assertEquals(dataScroller2.getCurrentPage(), lastPage);
assertTrue(dataScroller2.isLastPage());
verifyPageContent(lastPage);
-
+
dataScroller2.gotoFirstPage();
verifyPageContent(1);
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java 2011-11-03 16:55:33 UTC (rev 22874)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/DataScroller.java 2011-11-03 18:22:54 UTC (rev 22875)
@@ -197,7 +197,7 @@
}
int startPage = getCurrentPage();
clickLastPageButton();
- int lastPage = getCurrentPage();
+ lastPage = getCurrentPage();
if (startPage == 1) {
clickFirstPageButton();
} else {
13 years, 1 month
JBoss Rich Faces SVN: r22874 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-11-03 12:55:33 -0400 (Thu, 03 Nov 2011)
New Revision: 22874
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
Log:
test moved to 4.Future
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-11-03 16:55:07 UTC (rev 22873)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-11-03 16:55:33 UTC (rev 22874)
@@ -318,7 +318,7 @@
testTitle(panel);
}
- @Test
+ @Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11568")
public void testToggleListener() {
String reqTime = selenium.getText(time);
13 years, 1 month