JBoss Rich Faces SVN: r20075 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-17 10:47:13 -0500 (Wed, 17 Nov 2010)
New Revision: 20075
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Log:
RF-9664
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-11-17 15:45:24 UTC (rev 20074)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-11-17 15:47:13 UTC (rev 20075)
@@ -13,8 +13,8 @@
this.selValueInput = $(document.getElementById(id+"selValue"));
this.list = $(document.getElementById(id+"List"));
this.list.bind("click", $.proxy(this.__onListClick, this));
- this.openOnEdit = options.openOnEdit;
- this.saveOnSelect = options.saveOnSelect;
+ this.openOnEdit = mergedOptions.openOnEdit;
+ this.saveOnSelect = mergedOptions.saveOnSelect;
this.savedIndex = -1;
}
@@ -23,6 +23,8 @@
var defaultOptions = {
defaultLabel: "",
+ saveOnSelect: true,
+ openOnEdit: true,
showControl: false,
itemCss: "rf-is-opt",
selectItemCss: "rf-is-sel",
14 years, 1 month
JBoss Rich Faces SVN: r20074 - in trunk/ui/input: ui/src/main/java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-17 10:45:24 -0500 (Wed, 17 Nov 2010)
New Revision: 20074
Modified:
trunk/ui/input/api/src/main/java/org/richfaces/component/InplaceComponent.java
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
Log:
RF-9791, RF-9664
Modified: trunk/ui/input/api/src/main/java/org/richfaces/component/InplaceComponent.java
===================================================================
--- trunk/ui/input/api/src/main/java/org/richfaces/component/InplaceComponent.java 2010-11-17 13:50:50 UTC (rev 20073)
+++ trunk/ui/input/api/src/main/java/org/richfaces/component/InplaceComponent.java 2010-11-17 15:45:24 UTC (rev 20074)
@@ -45,7 +45,7 @@
public String getChangedStateClass();
- public String getDisableStateClass();
+ public String getDisabledStateClass();
public String getEditClass();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2010-11-17 13:50:50 UTC (rev 20073)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2010-11-17 15:45:24 UTC (rev 20074)
@@ -77,7 +77,7 @@
public abstract String getChangedStateClass();
@Attribute
- public abstract String getDisableStateClass();
+ public abstract String getDisabledStateClass();
@Attribute
public abstract String getEditClass();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2010-11-17 13:50:50 UTC (rev 20073)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2010-11-17 15:45:24 UTC (rev 20074)
@@ -198,7 +198,7 @@
}
public String getDisableStateCss(InplaceComponent component) {
- String css = component.getDisableStateClass();
+ String css = component.getDisabledStateClass();
return concatClasses("rf-ii-dis-s", css);
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2010-11-17 13:50:50 UTC (rev 20073)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectRendererBase.java 2010-11-17 15:45:24 UTC (rev 20074)
@@ -111,7 +111,7 @@
}
public String getDisableStateCss(InplaceComponent component) {
- String css = component.getDisableStateClass();
+ String css = component.getDisabledStateClass();
return concatClasses("rf-is-dis-s", css);
}
14 years, 1 month
JBoss Rich Faces SVN: r20073 - sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-17 08:50:50 -0500 (Wed, 17 Nov 2010)
New Revision: 20073
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
Log:
RF-9496
Modified: sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-17 11:12:28 UTC (rev 20072)
+++ sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-17 13:50:50 UTC (rev 20073)
@@ -46,27 +46,28 @@
this.input.hide();
this.input.unbind("change", this.addProxy);
var item = new Item(this.input);
- this.list.append(item.html());
+ this.list.append(item.getJQuery());
this.input = this.cleanInput.clone();
this.inputContainer.append(this.input);
this.input.change(this.addProxy);
}
});
+ var ITEM_HTML = '<div class="rf-fu-itm"><span class="rf-fu-itm-lft"><span class="rf-fu-itm-lbl"/></span>'
+ + '<span class="rf-fu-itm-rgh"><a href="javascript:void(0)" class="rf-fu-itm-lnk"/></span></div>';
+
var Item = function(input) {
this.input = input;
};
jQuery.extend(Item.prototype, {
- html: function() { //TODO Optimize concatenation of strings.
- return '<div class="rf-fu-itm">'
- + '<span class="rf-fu-itm-lft">'
- + '<span class="rf-fu-itm-lbl">' + this.input.val() + '</span>'
- + '</span>'
- + '<span class="rf-fu-itm-rgh">'
- + '<a href="#" class="rf-fu-itm-lnk">Delete</a>'
- + '</span>'
- + '</div>';
+ getJQuery: function() {
+ this.element = jQuery(ITEM_HTML);
+ this.label = this.element.children(".rf-fu-itm-lft:first").children(".rf-fu-itm-lbl:first");
+ this.link = this.element.children(".rf-fu-itm-rgh:first").children("a");
+ this.label.append(this.input.val());
+ this.link.append("Delete");
+ return this.element;
}
});
}(window.RichFaces, jQuery));
14 years, 1 month
JBoss Rich Faces SVN: r20072 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richAutocomplete and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 06:12:28 -0500 (Wed, 17 Nov 2010)
New Revision: 20072
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java
Removed:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocomplete.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
Log:
renamed TestAutocomplete to TestAutocompleteByKeys + extended by 1 test cases to test confirmation of autocompletion selection (RFPL-669)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2010-11-17 11:11:48 UTC (rev 20071)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/Autocomplete.java 2010-11-17 11:12:28 UTC (rev 20072)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.javascript.JQueryScript.jqScript;
import static org.jboss.test.selenium.javascript.JQueryScript.jqObject;
+import static org.jboss.test.selenium.waiting.WaitFactory.*;
import java.awt.event.KeyEvent;
@@ -41,120 +42,129 @@
*/
public class Autocomplete implements Model {
- private static String KEY_ENTER = "13";
- private static String KEY_UP = "38";
- private static String KEY_DOWN = "40";
+ private static String KEY_ENTER = "13";
+ private static String KEY_UP = "38";
+ private static String KEY_DOWN = "40";
- AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
- JQueryLocator input = pjq("input.rf-au-inp[id$=autocompleteInput]");
+ JQueryLocator input = pjq("input.rf-au-inp[id$=autocompleteInput]");
- JQueryLocator items = jq("div.rf-au-lst-cord[id$=autocompleteList] div[id$=autocompleteItems]");
- JQueryLocator selection = items.getDescendant(jq("div.rf-au-sel"));
- JQueryLocator option = jq("div.rf-au-opt");
- JQueryLocator labeledOption = jq("div.rf-au-opt:contains('{0}')");
+ JQueryLocator items = jq("div.rf-au-lst-cord[id$=autocompleteList] div[id$=autocompleteItems]");
+ JQueryLocator selection = items.getDescendant(jq("div.rf-au-sel"));
+ JQueryLocator option = jq("div.rf-au-opt");
+ JQueryLocator labeledOption = jq("div.rf-au-opt:contains('{0}')");
- public void typeKeys(String keys) {
- for (int i = 0; i < keys.length(); i++) {
- final String key = String.valueOf(keys.charAt(i));
- selenium.focus(input);
- selenium.keyPress(input, key);
- selenium.fireEvent(input, Event.KEYDOWN);
- }
- }
+ public void typeKeys(String keys) {
+ for (int i = 0; i < keys.length(); i++) {
+ final String key = String.valueOf(keys.charAt(i));
+ selenium.focus(input);
+ selenium.keyPress(input, key);
+ selenium.fireEvent(input, Event.KEYDOWN);
+ }
+ }
- public void confirmByKeys() {
- pressEnter();
- }
+ public void confirmByKeys() {
+ pressEnter();
+ }
- public void selectByKeys(String label) {
- int labeledIndex = getLabeledOptionIndex(label);
- while (getSelectedOptionIndex() < labeledIndex) {
- pressDown();
- }
- while (getSelectedOptionIndex() > labeledIndex) {
- pressUp();
- }
- }
+ public void selectByKeys(String label) {
+ int labeledIndex = getLabeledOptionIndex(label);
+ while (getSelectedOptionIndex() < labeledIndex) {
+ pressDown();
+ }
+ while (getSelectedOptionIndex() > labeledIndex) {
+ pressUp();
+ }
+ }
- public boolean isLabeledOptionAvailable(String label) {
- return selenium.isElementPresent(getLabeledOption(label));
- }
+ public boolean isLabeledOptionAvailable(String label) {
+ return selenium.isElementPresent(getLabeledOption(label));
+ }
- public int getLabeledOptionIndex(String label) {
- String index = selenium.getEval(jqScript(getLabeledOption(label), "index()"));
- return Integer.valueOf(index);
- }
+ public int getLabeledOptionIndex(String label) {
+ String index = selenium.getEval(jqScript(getLabeledOption(label),
+ "index()"));
+ return Integer.valueOf(index);
+ }
- public int getSelectedOptionIndex() {
- JavaScript script = jqScript(option, "index({0})").parametrize(jqObject(selection));
- String index = selenium.getEval(script);
- return Integer.valueOf(index);
- }
+ public int getSelectedOptionIndex() {
+ JavaScript script = jqScript(option, "index({0})").parametrize(
+ jqObject(selection));
+ String index = selenium.getEval(script);
+ return Integer.valueOf(index);
+ }
- public String getSelectedOptionText() {
- return selenium.getText(selection);
- }
+ public String getSelectedOptionText() {
+ return selenium.getText(selection);
+ }
- public String getInputText() {
- return selenium.getValue(input);
- }
+ public String getInputText() {
+ return selenium.getValue(input);
+ }
- private JQueryLocator getLabeledOption(String label) {
- return labeledOption.format(label);
- }
+ private JQueryLocator getLabeledOption(String label) {
+ return labeledOption.format(label);
+ }
- public void pressBackspace() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_BACK_SPACE));
- }
+ public void pressBackspace() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_BACK_SPACE));
+ }
- public void pressUp() {
- selenium.keyDown(input, KEY_UP);
- }
+ public void pressUp() {
+ selenium.keyDown(input, KEY_UP);
+ }
- public void pressDown() {
- selenium.keyDown(input, KEY_DOWN);
- }
+ public void pressDown() {
+ selenium.keyDown(input, KEY_DOWN);
+ }
- public void pressEnter() {
- selenium.keyDown(input, KEY_ENTER);
- }
+ public void pressEnter() {
+ selenium.keyDown(input, KEY_ENTER);
+ }
- public void pressLeft() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
- }
+ public void pressLeft() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
+ }
- public void pressRight() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
- }
+ public void pressRight() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
+ }
- public void pressDelete() {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_DELETE));
- }
+ public void pressDelete() {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_DELETE));
+ }
- public void textSelectionLeft(int size) {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
- for (int i = 0; i < size; i++) {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
- }
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
- }
+ public void textSelectionLeft(int size) {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
+ for (int i = 0; i < size; i++) {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_LEFT));
+ }
+ selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
+ }
- public void textSelectionRight(int size) {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
- for (int i = 0; i < size; i++) {
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
- }
- selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
- }
+ public void textSelectionRight(int size) {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_SHIFT));
+ for (int i = 0; i < size; i++) {
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_RIGHT));
+ }
+ selenium.keyUpNative(String.valueOf(KeyEvent.VK_SHIFT));
+ }
- public void textSelectAll() {
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
- selenium.keyPressNative(String.valueOf(KeyEvent.VK_A));
- selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
- }
+ public void textSelectAll() {
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
+ selenium.keyPressNative(String.valueOf(KeyEvent.VK_A));
+ selenium.keyDownNative(String.valueOf(KeyEvent.VK_CONTROL));
+ }
- public boolean isCompletionVisible() {
- return selenium.isElementPresent(option);
- }
+ public boolean isCompletionVisible() {
+ if (!selenium.isElementPresent(option)) {
+ return false;
+ }
+ return selenium.isVisible(option);
+ }
+
+ public void waitForCompletionVisible() {
+ waitGui.until(elementPresent.locator(option));
+ }
}
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocomplete.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocomplete.java 2010-11-17 11:11:48 UTC (rev 20071)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocomplete.java 2010-11-17 11:12:28 UTC (rev 20072)
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.richAutocomplete;
-
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.jboss.test.selenium.RequestTypeModelGuard.guardXhr;
-
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-
-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;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TestAutocomplete extends AbstractMetamerTest {
-
- final static Boolean[] booleanValues = new Boolean[] { true, false };
-
- AutocompleteAttributes attributes = new AutocompleteAttributes();
- Autocomplete autocomplete = new Autocomplete();
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath, "faces/components/richAutocomplete/autocomplete.xhtml");
- }
-
- @Inject
- @Use("booleanValues")
- Boolean autofill;
-
- @Inject
- @Use("booleanValues")
- Boolean selectFirst;
-
- List<Capital> capitals;
-
- StringBuilder partialInput;
-
- {
- try {
- capitals = Model.unmarshallCapitals();
- } catch (JAXBException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @BeforeMethod
- public void prepareProperties() {
- attributes.setAutofill(autofill);
- attributes.setSelectFirst(selectFirst);
- if (autofill == null) {
- autofill = false;
- }
- if (selectFirst == null) {
- selectFirst = false;
- }
- }
-
- @Test
- public void testConditions() {
-
- assertFalse(autocomplete.isCompletionVisible());
-
- typePrefix("ala");
-
- deleteAll();
- }
-
- public void deleteAll() {
- partialInput = new StringBuilder();
-
- autocomplete.textSelectAll();
- guardXhr(autocomplete).pressBackspace();
-
- assertEquals(autocomplete.getInputText(), getExpectedStateForPrefix());
- assertEquals(autocomplete.getSelectedOptionIndex(), getExpectedSelectedOptionIndex());
- }
-
- 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 int getExpectedSelectedOptionIndex() {
- return (selectFirst) ? 0 : -1;
- }
-
- 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;
- }
-}
Added: 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 (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAutocomplete/TestAutocompleteByKeys.java 2010-11-17 11:12:28 UTC (rev 20072)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richAutocomplete;
+
+import static org.jboss.test.selenium.RequestTypeModelGuard.guardXhr;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.bind.JAXBException;
+
+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;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestAutocompleteByKeys extends AbstractMetamerTest {
+
+ AutocompleteAttributes attributes = new AutocompleteAttributes();
+ Autocomplete autocomplete = new Autocomplete();
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath,
+ "faces/components/richAutocomplete/autocomplete.xhtml");
+ }
+
+ @Inject
+ @Use(booleans = { true, false })
+ Boolean autofill;
+
+ @Inject
+ @Use(booleans = { true, false })
+ Boolean selectFirst;
+
+ List<Capital> capitals;
+
+ StringBuilder partialInput;
+
+ {
+ try {
+ capitals = Model.unmarshallCapitals();
+ } catch (JAXBException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ @BeforeMethod
+ public void prepareProperties() {
+ attributes.setAutofill(autofill);
+ attributes.setSelectFirst(selectFirst);
+ if (autofill == null) {
+ autofill = false;
+ }
+ if (selectFirst == null) {
+ selectFirst = false;
+ }
+ }
+
+ @Test
+ public void testTypingPrefixAndThenConfirm() {
+ assertCompletionVisible(false);
+ typePrefix("ala");
+ assertCompletionVisible(true);
+ confirm();
+ assertCompletionVisible(false);
+ }
+
+ @Test
+ public void testTypingPrefixAndThenDeleteAll() {
+ assertCompletionVisible(false);
+ typePrefix("ala");
+ assertCompletionVisible(true);
+ deleteAll();
+ assertCompletionVisible(true);
+ }
+
+ private void assertCompletionVisible(boolean assertCompletionVisible) {
+ assertEquals(autocomplete.isCompletionVisible(),
+ assertCompletionVisible);
+ }
+
+ public void confirm() {
+ autocomplete.confirmByKeys();
+ autocomplete.waitForCompletionVisible();
+ }
+
+ public void deleteAll() {
+ partialInput = new StringBuilder();
+
+ autocomplete.textSelectAll();
+ guardXhr(autocomplete).pressBackspace();
+
+ assertEquals(autocomplete.getInputText(), getExpectedStateForPrefix());
+ assertEquals(autocomplete.getSelectedOptionIndex(),
+ getExpectedSelectedOptionIndex());
+ }
+
+ 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 int getExpectedSelectedOptionIndex() {
+ return (selectFirst) ? 0 : -1;
+ }
+
+ 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;
+ }
+}
14 years, 1 month
JBoss Rich Faces SVN: r20071 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: annotations and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 06:11:48 -0500 (Wed, 17 Nov 2010)
New Revision: 20071
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
Log:
added support for booleans in @Use and MatrixConfigurator
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 10:21:03 UTC (rev 20070)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 11:11:48 UTC (rev 20071)
@@ -322,6 +322,12 @@
return Arrays.asList(useAnnotation.strings());
}
}
+
+ if (useAnnotation.booleans().length > 0) {
+ if (parameterType == boolean.class || parameterType == Boolean.class) {
+ return Arrays.asList(ArrayUtils.toObject(useAnnotation.booleans()));
+ }
+ }
// tries satisfy parameter from fields
List<Object> result = new LinkedList<Object>();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 10:21:03 UTC (rev 20070)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 11:11:48 UTC (rev 20071)
@@ -38,6 +38,8 @@
String[] value() default {};
String[] strings() default {};
+
+ boolean[] booleans() default {};
int[] ints() default {};
14 years, 1 month
JBoss Rich Faces SVN: r20070 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: annotations and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 05:21:03 -0500 (Wed, 17 Nov 2010)
New Revision: 20070
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
Log:
patch for using strings in MatrixConfiguration and @Use
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 10:20:27 UTC (rev 20069)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 10:21:03 UTC (rev 20070)
@@ -316,6 +316,12 @@
return Arrays.asList(ArrayUtils.toObject(useAnnotation.decimals()));
}
}
+
+ if (useAnnotation.strings().length > 0) {
+ if (parameterType == String.class) {
+ return Arrays.asList(useAnnotation.strings());
+ }
+ }
// tries satisfy parameter from fields
List<Object> result = new LinkedList<Object>();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 10:20:27 UTC (rev 20069)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 10:21:03 UTC (rev 20070)
@@ -36,6 +36,8 @@
String field() default "";
String[] value() default {};
+
+ String[] strings() default {};
int[] ints() default {};
14 years, 1 month
JBoss Rich Faces SVN: r20069 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: annotations and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 05:20:27 -0500 (Wed, 17 Nov 2010)
New Revision: 20069
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
Log:
patch for using decimal numbers in MatrixConfiguration and @Use
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 10:18:14 UTC (rev 20068)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17 10:20:27 UTC (rev 20069)
@@ -310,6 +310,12 @@
return Arrays.asList(ArrayUtils.toObject(useAnnotation.ints()));
}
}
+
+ if (useAnnotation.decimals().length > 0) {
+ if (parameterType == double.class || parameterType == Double.class) {
+ return Arrays.asList(ArrayUtils.toObject(useAnnotation.decimals()));
+ }
+ }
// tries satisfy parameter from fields
List<Object> result = new LinkedList<Object>();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 10:18:14 UTC (rev 20068)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17 10:20:27 UTC (rev 20069)
@@ -39,5 +39,7 @@
int[] ints() default {};
+ double[] decimals() default {};
+
boolean empty() default false;
}
14 years, 1 month
JBoss Rich Faces SVN: r20068 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 05:18:14 -0500 (Wed, 17 Nov 2010)
New Revision: 20068
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/
modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
added sandbox for veryfing Expression Language expressions
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-17 10:17:18 UTC (rev 20067)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-17 10:18:14 UTC (rev 20068)
@@ -109,6 +109,7 @@
components.put("a4jRegion", "A4J Region");
components.put("a4jRepeat", "A4J Repeat");
components.put("a4jStatus", "A4J Status");
+ components.put("expressionLanguage", "Expression Language");
components.put("commandButton", "JSF Command Button");
components.put("hDataTable", "JSF Data Table");
components.put("uiRepeat", "UI Repeat");
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/list.xhtml 2010-11-17 10:18:14 UTC (rev 20068)
@@ -0,0 +1,42 @@
+<?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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">JSF Data Table</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple EL Expressions (to verify compatibility)
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/expressionLanguage/simple.xhtml 2010-11-17 10:18:14 UTC (rev 20068)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" >
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <h:outputStylesheet library="css" name="hDataTable.css"/>
+ </ui:define>
+
+ <ui:define name="component">
+ <p><h:outputText value="model.capitals.size(): #{model.capitals.size()}" /></p>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r20067 - modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 05:17:18 -0500 (Wed, 17 Nov 2010)
New Revision: 20067
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components1.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
Log:
fixed the wrong EL (can't parse #{list.size()} - used #{fn:length(list)}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components1.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components1.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components1.xhtml 2010-11-17 10:17:18 UTC (rev 20067)
@@ -2,7 +2,7 @@
<!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">
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<!--
JBoss, Home of Professional Open Source
@@ -141,7 +141,7 @@
</rich:inputNumberSpinner>
</rich:column>
<f:facet name="footer">
- <h:outputText value="Total of #{list[0].sex == 'MALE' ? 'men' : 'women'}: #{list.size()}" />
+ <h:outputText value="Total of #{list[0].sex == 'MALE' ? 'men' : 'women'}: #{fn:length(list)}" />
</f:facet>
</rich:subTable>
</rich:dataTable>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-11-17 10:17:18 UTC (rev 20067)
@@ -2,7 +2,7 @@
<!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">
+ xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<!--
JBoss, Home of Professional Open Source
@@ -145,7 +145,7 @@
</rich:inputNumberSlider>
</rich:column>
<f:facet name="footer">
- <h:outputText value="Total of #{list[0].sex == 'MALE' ? 'men' : 'women'}: #{list.size()}" />
+ <h:outputText value="Total of #{list[0].sex == 'MALE' ? 'men' : 'women'}: #{fn:length(list)}" />
</f:facet>
</rich:subTable>
</rich:dataTable>
14 years, 1 month
JBoss Rich Faces SVN: r20066 - modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-11-17 04:35:08 -0500 (Wed, 17 Nov 2010)
New Revision: 20066
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml
Removed:
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml
Log:
rich:extendedDataTable - fixed all samples of sorting by component control - sorting.xhtml divided to two samples (sorting using component control and sorting using column attributes) (RFPL-919, RFPL-918)
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/list.xhtml 2010-11-17 09:34:09 UTC (rev 20065)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/list.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -49,14 +49,17 @@
<span style="color: red">TODO will be used with various types of input and command components as soon as available</span>
</metamer:testPageLink>
- <metamer:testPageLink id="sorting" outcome="sorting" value="Table Sorting">
- Page that contains sortable <b>rich:extendedDataTable</b> (with model containing capitals) and input boxes for all its attributes.
+ <metamer:testPageLink id="sorting-using-component-control" outcome="sorting-using-component-control" value="Table Sorting - Component Control">
+ <b>rich:extendedDataTable</b> (with model containing states and capitals) sortable by <b>rich:componentControl</b>.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="sorting-using-column" outcome="sorting-using-column" value="Table Sorting - Column based">
+ <b>rich:extendedDataTable</b> (with model containing states and capitals) custom sorting by <b>rich:column</b>'s attribute @sortBy, @sortOrder.
+ </metamer:testPageLink>
<metamer:testPageLink id="filtering" outcome="filtering" value="Table filtering">
Page that contains filterable <b>rich:extendedDataTable</b> (with model containing capitals) and input boxes for all its attributes.
</metamer:testPageLink>
-
</ui:define>
</ui:composition>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml 2010-11-17 09:34:09 UTC (rev 20065)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/scroller.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -129,7 +129,9 @@
<ui:define name="outOfTemplateAfter">
<h:commandButton id="sortStatesButton" value="sort state">
- <rich:componentControl event="click" target="richEDT" operation="sort"/>
+ <rich:componentControl event="click" target="richEDT" operation="sort">
+ <f:param value="columnState" />
+ </rich:componentControl>
</h:commandButton>
<h:commandButton id="sortCapitalsButton" value="sort capital">
@@ -137,8 +139,14 @@
<f:param value="columnCapital" />
</rich:componentControl>
</h:commandButton>
+
+ <br/><br/>
+
+ <h:commandButton id="sortTableButton" value="sort table">
+ <rich:componentControl event="click" target="richEDT" operation="sort" />
+ </h:commandButton>
- <br/>
+ <br/><br/>
scroller1:
<h:commandButton id="buttonFirst1" value="<< first">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml 2010-11-17 09:34:09 UTC (rev 20065)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/simple.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -124,7 +124,9 @@
<ui:define name="outOfTemplateAfter">
<h:commandButton id="sortStatesButton" value="sort states">
- <rich:componentControl event="click" target="richEDT" operation="sort"/>
+ <rich:componentControl event="click" target="richEDT" operation="sort">
+ <f:param value="columnState" />
+ </rich:componentControl>
</h:commandButton>
<h:commandButton id="sortCapitalsButton" value="sort capitals">
@@ -134,7 +136,12 @@
</h:commandButton>
<br/><br/>
+
+ <h:commandButton id="sortTableButton" value="sort table">
+ <rich:componentControl event="click" target="richEDT" operation="sort" />
+ </h:commandButton>
+ <br/><br/>
<metamer:attributes value="#{richExtendedDataTableBean.attributes}" id="attributes" />
</ui:define>
Copied: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml (from rev 20065, modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-column.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <style type="text/css">
+ .rf-edt {
+ width: 300px !important;
+ height: 300px !important;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richDataTable scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <rich:dataScroller id="scroller1" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table"/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:extendedDataTable id="table"
+ beforeselectionchange="#{richExtendedDataTableBean.attributes['beforeselectionchange'].value}"
+ clientFirst="#{richExtendedDataTableBean.attributes['clientFirst'].value}"
+ clientRows="#{richExtendedDataTableBean.attributes['clientRows'].value}"
+ filterVar="#{richExtendedDataTableBean.attributes['filterVar'].value}"
+ filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners'].value}"
+ first="#{richExtendedDataTableBean.attributes['first'].value}"
+ frozenColumns="#{richExtendedDataTableBean.attributes['frozenColumns'].value}"
+ iterationState="#{richExtendedDataTableBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richExtendedDataTableBean.attributes['keepSaved'].value}"
+ noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel'].value}"
+ relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richExtendedDataTableBean.attributes['rendered'].value}"
+ rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable'].value}"
+ rowCount="#{richExtendedDataTableBean.attributes['rowCount'].value}"
+ rowData="#{richExtendedDataTableBean.attributes['rowData'].value}"
+ rowIndex="#{richExtendedDataTableBean.attributes['rowIndex'].value}"
+ rowKey="#{richExtendedDataTableBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter'].value}"
+ rows="#{richExtendedDataTableBean.attributes['rows'].value}"
+ selection="#{richExtendedDataTableBean.attributes['selection'].value}"
+ selectionchange="#{richExtendedDataTableBean.attributes['selectionchange'].value}"
+ sortMode="#{richExtendedDataTableBean.attributes['sortMode'].value}"
+ sortPriority="#{richExtendedDataTableBean.attributes['sortPriority'].value}"
+ sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners'].value}"
+ style="#{richExtendedDataTableBean.attributes['style'].value}"
+ styleClass="#{richExtendedDataTableBean.attributes['styleClass'].value}"
+ value="#{richExtendedDataTableBean.state ? model.capitals : null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data." style="color: red;"/>
+ </f:facet>
+
+ <rich:column id="columnState" sortBy="#{record.state}" sortOrder="#{richExtendedDataTableBean.statesOrder}">
+ <f:facet name="header">
+ <a4j:commandLink id="columnHeaderState" value="State" render="table" action="#{richExtendedDataTableBean.sortByStates}"/>
+ </f:facet>
+
+ <h:outputText value="#{record.state}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState" value="State" />
+ </f:facet>
+ </rich:column>
+
+ <rich:column id="columnCapital" sortBy="#{record.name}" sortOrder="#{richExtendedDataTableBean.capitalsOrder}">
+ <f:facet name="header">
+ <a4j:commandLink id="columnHeaderCapital" value="Capital" render="table" action="#{richExtendedDataTableBean.sortByCapitals}"/>
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterCapital" value="Capital" />
+ </f:facet>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller2" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table" />
+ </f:facet>
+
+ </rich:extendedDataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richExtendedDataTableBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml (from rev 20065, modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting-using-component-control.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <style type="text/css">
+ .rf-edt {
+ width: 300px !important;
+ height: 300px !important;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richDataTable scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <rich:dataScroller id="scroller1" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table"/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:extendedDataTable id="table"
+ beforeselectionchange="#{richExtendedDataTableBean.attributes['beforeselectionchange'].value}"
+ clientFirst="#{richExtendedDataTableBean.attributes['clientFirst'].value}"
+ clientRows="#{richExtendedDataTableBean.attributes['clientRows'].value}"
+ filterVar="#{richExtendedDataTableBean.attributes['filterVar'].value}"
+ filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners'].value}"
+ first="#{richExtendedDataTableBean.attributes['first'].value}"
+ frozenColumns="#{richExtendedDataTableBean.attributes['frozenColumns'].value}"
+ iterationState="#{richExtendedDataTableBean.attributes['iterationState'].value}"
+ iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar'].value}"
+ keepSaved="#{richExtendedDataTableBean.attributes['keepSaved'].value}"
+ noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel'].value}"
+ relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex'].value}"
+ rendered="#{richExtendedDataTableBean.attributes['rendered'].value}"
+ rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable'].value}"
+ rowCount="#{richExtendedDataTableBean.attributes['rowCount'].value}"
+ rowData="#{richExtendedDataTableBean.attributes['rowData'].value}"
+ rowIndex="#{richExtendedDataTableBean.attributes['rowIndex'].value}"
+ rowKey="#{richExtendedDataTableBean.attributes['rowKey'].value}"
+ rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter'].value}"
+ rows="#{richExtendedDataTableBean.attributes['rows'].value}"
+ selection="#{richExtendedDataTableBean.attributes['selection'].value}"
+ selectionchange="#{richExtendedDataTableBean.attributes['selectionchange'].value}"
+ sortMode="#{richExtendedDataTableBean.attributes['sortMode'].value}"
+ sortPriority="#{richExtendedDataTableBean.attributes['sortPriority'].value}"
+ sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners'].value}"
+ style="#{richExtendedDataTableBean.attributes['style'].value}"
+ styleClass="#{richExtendedDataTableBean.attributes['styleClass'].value}"
+ value="#{richExtendedDataTableBean.state ? model.capitals : null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data." style="color: red;"/>
+ </f:facet>
+
+ <rich:column id="columnState" sortBy="#{record.state}">
+ <f:facet name="header">
+ State
+ </f:facet>
+
+ <h:outputText value="#{record.state}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState" value="State" />
+ </f:facet>
+ </rich:column>
+
+ <rich:column id="columnCapital" sortBy="#{record.name}">
+ <f:facet name="header">
+ Capital
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterCapital" value="Capital" />
+ </f:facet>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller2" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table" />
+ </f:facet>
+
+ </rich:extendedDataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <h:commandButton id="sortStatesButton" value="sort state">
+ <rich:componentControl event="click" target="table" operation="sort">
+ <f:param value="columnState" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ <h:commandButton id="sortCapitalsButton" value="sort capital">
+ <rich:componentControl event="click" target="table" operation="sort">
+ <f:param value="columnCapital" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ <br/><br/>
+
+ <h:commandButton id="sortTableButton" value="sort table">
+ <rich:componentControl event="click" target="table" operation="sort" />
+ </h:commandButton>
+
+ <br/><br/>
+
+ <metamer:attributes value="#{richExtendedDataTableBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Deleted: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml 2010-11-17 09:34:09 UTC (rev 20065)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/sorting.xhtml 2010-11-17 09:35:08 UTC (rev 20066)
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
- xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich">
-
- <!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
-
- <ui:composition template="/templates/template.xhtml">
-
- <ui:define name="head">
- <f:metadata>
- <f:viewParam name="templates" value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
- <style type="text/css">
- .rf-edt {
- width: 300px !important;
- height: 300px !important;
- }
- </style>
- </ui:define>
-
- <ui:define name="outOfTemplateBefore">
- <br/>
- <h:outputText value="Show data in table: " />
- <h:selectBooleanCheckbox id="noDataCheckbox" value="#{richExtendedDataTableBean.state}">
- <a4j:ajax render="richDataTable scroller1"/>
- </h:selectBooleanCheckbox>
- <br/><br/>
- <rich:dataScroller id="scroller1" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table"/>
- </ui:define>
-
- <ui:define name="component">
-
- <rich:extendedDataTable id="table"
- beforeselectionchange="#{richExtendedDataTableBean.attributes['beforeselectionchange'].value}"
- clientFirst="#{richExtendedDataTableBean.attributes['clientFirst'].value}"
- clientRows="#{richExtendedDataTableBean.attributes['clientRows'].value}"
- filterVar="#{richExtendedDataTableBean.attributes['filterVar'].value}"
- filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners'].value}"
- first="#{richExtendedDataTableBean.attributes['first'].value}"
- frozenColumns="#{richExtendedDataTableBean.attributes['frozenColumns'].value}"
- iterationState="#{richExtendedDataTableBean.attributes['iterationState'].value}"
- iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar'].value}"
- keepSaved="#{richExtendedDataTableBean.attributes['keepSaved'].value}"
- noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel'].value}"
- relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex'].value}"
- rendered="#{richExtendedDataTableBean.attributes['rendered'].value}"
- rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable'].value}"
- rowCount="#{richExtendedDataTableBean.attributes['rowCount'].value}"
- rowData="#{richExtendedDataTableBean.attributes['rowData'].value}"
- rowIndex="#{richExtendedDataTableBean.attributes['rowIndex'].value}"
- rowKey="#{richExtendedDataTableBean.attributes['rowKey'].value}"
- rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter'].value}"
- rows="#{richExtendedDataTableBean.attributes['rows'].value}"
- selection="#{richExtendedDataTableBean.attributes['selection'].value}"
- selectionchange="#{richExtendedDataTableBean.attributes['selectionchange'].value}"
- sortMode="#{richExtendedDataTableBean.attributes['sortMode'].value}"
- sortPriority="#{richExtendedDataTableBean.attributes['sortPriority'].value}"
- sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners'].value}"
- style="#{richExtendedDataTableBean.attributes['style'].value}"
- styleClass="#{richExtendedDataTableBean.attributes['styleClass'].value}"
- value="#{richExtendedDataTableBean.state ? model.capitals : null}"
- var="record"
- >
-
- <f:facet name="noData">
- <h:outputText value="There is no data." style="color: red;"/>
- </f:facet>
-
- <rich:column id="columnState" sortBy="#{record.state}" sortOrder="#{richExtendedDataTableBean.statesOrder}">
- <f:facet name="header">
- <a4j:commandLink id="columnHeaderState" value="State" render="table" action="#{richExtendedDataTableBean.sortByStates}"/>
- </f:facet>
-
- <h:outputText value="#{record.state}" />
- <f:facet name="footer">
- <h:outputText id="columnFooterState" value="State" />
- </f:facet>
- </rich:column>
-
- <rich:column id="columnCapital" sortBy="#{record.name}" sortOrder="#{richExtendedDataTableBean.capitalsOrder}" sortingListeners="#{richExtendedDataTableBean.sortingListener}">
- <f:facet name="header">
- <a4j:commandLink id="columnHeaderCapital" value="Capital" render="table" action="#{richExtendedDataTableBean.sortByCapitals}"/>
- </f:facet>
-
- <h:outputText value="#{record.name}" />
- <f:facet name="footer">
- <h:outputText id="columnFooterCapital" value="Capital" />
- </f:facet>
- </rich:column>
-
- <f:facet name="footer">
- <rich:dataScroller id="scroller2" for="table" page="#{richExtendedDataTableBean.page}" maxPages="7" render="table" />
- </f:facet>
-
- </rich:extendedDataTable>
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
- <h:commandButton id="sortStatesButton" value="sort state">
- <rich:componentControl event="click" target="table" operation="sort"/>
- </h:commandButton>
-
- <h:commandButton id="sortCapitalsButton" value="sort capital">
- <rich:componentControl event="click" target="table" operation="sort">
- <f:param value="columnCapital" />
- </rich:componentControl>
- </h:commandButton>
-
- <br/><br/>
-
- <metamer:attributes value="#{richExtendedDataTableBean.attributes}" id="attributes" />
- </ui:define>
-
- </ui:composition>
-</html>
\ No newline at end of file
14 years, 1 month